This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's TI-BASIC subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. TI-Basic => TI-BASIC
Author Message
crazymao


Newbie


Joined: 22 Apr 2009
Posts: 6

Posted: 23 Apr 2009 05:15:23 pm    Post subject:

This thread is for all the users who have TI-89s and want to program on it. I myself own a TI-89 and am still in the process of learning but I will try to help and I encourage you 89 owners to help out as well.

To start things off here is a basic number guessing game:

Code:
:guessing()
:Prgm
:Loop
:ClrI0
:Disp "welcome to the guessing game"
:Disp "please select the range"
:Input "0 to",b
:ClrI0
:Disp "guess a number"
:rand(b)->n
:While g≠n
:Input "guess:",g
:If g>n Then
:ClrI0
:Disp "lower"
:Else
:ClrI0
:Disp "higher"
:EndIf
:EndWhile
:ClrI0
:Disp "you win"
:Disp "the number was"
:Disp n
:Disp "press enter to continue"
:Pause
:ClrI0
:Disp "play again? (y,n)"
:Input "",pa
:If pa=y Then
:
:Else
:Exit
:EndIf
:EndLoop
:EndPrgm


This is a 100% working program for TI-89, I tested it on mine.

Please post your programs and/or questions.


Last edited by Guest on 24 Apr 2009 12:46:00 pm; edited 1 time in total
Back to top
cjgone
Aw3s0m3


Active Member


Joined: 24 May 2006
Posts: 693

Posted: 23 Apr 2009 05:22:43 pm    Post subject:

Ooh, good ol' days of the guessing number game. Smile
Back to top
TI-newb


Member


Joined: 24 Dec 2008
Posts: 158

Posted: 23 Apr 2009 09:17:04 pm    Post subject:

LOL, i'm a Ti-84+ programmer, but my freind also has a 89 and just yeseterday he was complaining about NO TI-89 Programming! He's just started and ive helped him out. you two can be Ti-89 buddys XD.

Just today, we made a Guessing game. it definetly was different then Ti-84.
Back to top
crazymao


Newbie


Joined: 22 Apr 2009
Posts: 6

Posted: 24 Apr 2009 10:14:18 am    Post subject:

right now i am trying to create a script that will move a certain object on the X axis. i will post my progress but any ideas will be appreciated

ps: TI-89 is very very different then 83 or 84

here is what i have, it moves a dot both y and x axis and has boundaries


Code:
movement()
Prgm
70 -> x
30 -> y
Loop
getkey() - > k
If k=337 Then
x-5 -> x
EndIf
If k=340 Then
x+5 -> x
End If
If k=338 Then
y-5 -> y
EndIf
If k=344 Then
y+5 -> y
EndIf
If y=0 Then
5 -> y
EndIf
If x=0 Then
5 -> x
EndIf
If y=60 Then
55 -> y
EndIf
If x=150 Then
145 -> x
EndIf
ClrI0
OutPut y,x,"."
EndLoop
EndPrgm


Last edited by Guest on 24 Apr 2009 12:48:35 pm; edited 1 time in total
Back to top
tifreak8x


Elite


Joined: 27 Aug 2005
Posts: 956

Posted: 25 Apr 2009 10:39:01 pm    Post subject:

http://tifreakware.net/tutorials/89/b/

Might look through some of that, grant elliot's tutorial is pretty good if memory serves. =]
Back to top
IAmACalculator
In a state of quasi-hiatus


Know-It-All


Joined: 21 Oct 2005
Posts: 1571

Posted: 27 Apr 2009 08:19:19 pm    Post subject:

My advice is to go to education.ti.com and download the manual, which is vastly useful in learning how to program.

Your code can be made much smaller with the when( function. The syntax goes like this: when(condition,return if true,return if false, return if indeterminate). This can dramatically cut down on extraneous If statements. For what you're doing, you could do nested when( statements:

movement()
Prgm
70 -> x
30 -> y
Loop
getkey() - > k
when(k=337,-5,when(k=340,5,0))+x -> x
when(k=338,-5,when(k=344,5,0))+x -> x
when(x=0,5,when(x=150,145,y)) -> x
when(y=0,5,when(y=60,55,y)) -> y
ClrI0
OutPut y,x,"."
EndLoop
EndPrgm


Last edited by Guest on 11 Jul 2010 05:44:43 pm; edited 1 time in total
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement