Author Topic: TI-BASIC Q&A  (Read 65732 times)

0 Members and 1 Guest are viewing this topic.

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: TI-BASIC Q&A
« Reply #30 on: December 08, 2011, 08:14:33 pm »
Ok, screen dimentions were wrong
* epic7 adds zstandard
That will work, right?
yes, if you want a 10*10 window. ;)

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: TI-BASIC Q&A
« Reply #31 on: December 08, 2011, 08:15:30 pm »
I just wan't to keep that game and have it work for historical reasons :P

Offline njaddison

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 176
  • Rating: +24/-27
    • View Profile
Re: TI-BASIC Q&A
« Reply #32 on: December 08, 2011, 08:46:42 pm »
What kind of Ti-Basic are you guys talking about? nspire basic, which I know alot about, or ti-84 basic, which I know almost nothing about?
<a href="http://www.nerdtests.com/ft_nt2.php">
<img src="http://www.nerdtests.com/images/badge/nt2/5f42ec78e054645d.png" alt="NerdTests.com says I'm a Highly Dorky Nerd God.  Click here to take the Nerd Test, get geeky images and jokes, and talk to others on the nerd forum!">
</a>


Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: TI-BASIC Q&A
« Reply #33 on: December 08, 2011, 08:47:10 pm »
83 and 84 basic
« Last Edit: December 08, 2011, 08:48:31 pm by epic7 »

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: TI-BASIC Q&A
« Reply #34 on: December 08, 2011, 08:47:23 pm »
What kind of Ti-Basic are you guys talking about? nspire basic, which I know alot about, or ti-84 basic, which I know almost nothing about?
yes, the latter. (83 BASIC) :)

EDIT: ninja'd! and lost the game! :ninja:
« Last Edit: December 08, 2011, 08:48:05 pm by parser padwan »

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: TI-BASIC Q&A
« Reply #35 on: December 08, 2011, 08:47:51 pm »
Ninja'd :ninja:

I think there's an nspire basic somewhere though.
« Last Edit: December 08, 2011, 08:48:07 pm by epic7 »

Offline CVSoft

  • LV3 Member (Next: 100)
  • ***
  • Posts: 65
  • Rating: +5/-0
    • View Profile
    • CVSoft Homepage (work in progress)
Re: TI-BASIC Q&A
« Reply #36 on: January 02, 2012, 11:54:25 pm »
I'm reworking my Windows 85/86 program, and would like to know if there is any way to shrink this code:

Code: [Select]
0→x
Repeat x
getKey→x
End
If x≠[a getKey value]
Goto [label]

Is it possible? How would this be done?
It was originally TI-85 code, but it works (and preferably needs to work) from TI-82 to TI-86.
« Last Edit: January 02, 2012, 11:58:17 pm by CVSoft »
Current projects:
Sunθ v4.0 (Solar Position Calculator) (on hold)
CBLLight/CBLTherm (TI-Z80 only)
CBLM (68k only)
--KJ6PSG

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: TI-BASIC Q&A
« Reply #37 on: January 02, 2012, 11:55:48 pm »
Code: [Select]
Repeat GetKey
End
If Ans≠[a getKey value]
Goto [label]
that should work...

Also Parser that code would not work at all, or at least not do the same thing.  It only checks for a key once, and if there is no key, the loop will go forever.
ah yes, fixed ;D (I think) :P
« Last Edit: January 03, 2012, 12:00:12 am by parser padwan »

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: TI-BASIC Q&A
« Reply #38 on: January 02, 2012, 11:57:01 pm »
I'm reworking my Windows 85/86 program, and would like to know if there is any way to shrink this code:
Try this
Code: [Select]
Repeat Ans
getKey
End
If Ans≠[a getKey value]
Goto [label]

Also Parser that code would not work at all, or at least not do the same thing.  It only checks for a key once, and if there is no key, the loop will go forever.
« Last Edit: January 02, 2012, 11:58:32 pm by Builderboy »

Offline CVSoft

  • LV3 Member (Next: 100)
  • ***
  • Posts: 65
  • Rating: +5/-0
    • View Profile
    • CVSoft Homepage (work in progress)
Re: TI-BASIC Q&A
« Reply #39 on: January 03, 2012, 06:43:35 pm »
I've forgotten to say that the returned key may need to be stored (many complicated reasons [simulated keypresses over link on 83+]) but that's an easy fix.

Parser: This code only seems to work on the 83 series; it returns 0 for Ans on the 85 series. It is about as small as it gets without starting any contests.

Builderboy: That code works well for the 85/86; I realized the 0→x part was unnecessary as Repeat doesn't test before running.

Thank you both for your help!
« Last Edit: January 03, 2012, 06:44:14 pm by CVSoft »
Current projects:
Sunθ v4.0 (Solar Position Calculator) (on hold)
CBLLight/CBLTherm (TI-Z80 only)
CBLM (68k only)
--KJ6PSG

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: TI-BASIC Q&A
« Reply #40 on: February 06, 2012, 04:09:33 pm »
I never learned what 'Tangent' and 'sub' do in BASIC. Could someone enlighten me?
« Last Edit: February 06, 2012, 04:09:54 pm by parser padwan »

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: TI-BASIC Q&A
« Reply #41 on: February 06, 2012, 04:15:08 pm »
You should check out TiBasic Developer, they have well documented pages on pretty much every TiBasic command there is!  Just type whatever command you are curious about into the search bar and learn :D

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: TI-BASIC Q&A
« Reply #42 on: February 06, 2012, 04:39:12 pm »
[tibd]sub[/tibd] returns a substring and is one of the most useful commands there is. [tibd]Tangent[/tibd] draws a tangent to a curve. As Builderboy suggested, look on TI|BD for usage info (links right in this post :)).




Offline nxtboy III

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 795
  • Rating: +26/-1
  • NXT!
    • View Profile
    • Program NXT
Re: TI-BASIC Q&A
« Reply #43 on: March 01, 2012, 09:12:36 pm »
I'm a real super super super beginner, but how do you check if a certain key is pressed?
Also are there arrays in BASIC?

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: TI-BASIC Q&A
« Reply #44 on: March 01, 2012, 09:13:24 pm »
instead of array, we have list (element start from 1, not 0 >:D).
for key check, we use getKey.
Sig wipe!