FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


TI-Basic help





Raidation
Ugh...
This is annoying.

I'm programming on my TI-84 Silver Edition.


And for some reason, the following code doesn't work:

10->T
While 1
T-1->T
End


WTF is wrong with it?
Peterssidan
It looks like an infinite loop. Maybe you want to change 1 to something else. eg T>0:
Code:
10->T
While T>0
T-1->T
End
joostvane
I just started fooling around with my TI 84 Plus myself, when we got a program from our teacher at school. At the moment, just reading through code and changing random things Razz

Do you plan to create more programs?
Raidation
@Peterssidan: But I want it to go down to the negatives... It's supposed to be a reflex game. This is the only problem I have...

@joostvane: Yes, I plan on creating more programs... or rather, games.
I'd post some right now, but unfortunately, due to Vista x64's stupid security, TI Connect and the driver won't work. Sad
Peterssidan
But your program doesn't make sense. It doesn't print anything and there is no input. just an never ending loop :s What is it you want to happen? I don't have an TI-84 myself so please tell me if I'm way off.
Raidation
Well, I did add a display command...
I have to press a key for it to get to the next number...

But that might be because I have a getKey command...
I don't know how that would mess it up
AftershockVibe
Raidation wrote:
Well, I did add a display command...
I have to press a key for it to get to the next number...

But that might be because I have a getKey command...
I don't know how that would mess it up


I don't have a TI-84 either, but assuming it goes by standard programming convention...

Display will be required to show anything on screen - printing every intermediate result in a long calculation would be annoying and slow.


I assume what you actually want to do is break from the loop (which prints a count-down) when a keypress is detected?

Try something like (put in the proper syntax):
Code:
10->T
While T>0
T-1->T
T->Display
getKey->K
If K != 0
Goto BREAK
End
Label BREAK
End
Raidation
Yeah...
I got it fixed

My original code was:
Code:
:While 1
:T-1->T
:getKey->K
:While K=0
:getKey->K
:End
:End


All I had to do was remove the
Code:
:While K=0
:getKey->K
:End

Part...

O.o
Related topics
What computer languages you know?
Microsoft Visual Basic help
TI-Connect software won't run on my xp
Photoshop Tuts
Programming in a lot of languages
Need help with some basic stuff..
Programming
MANOFGAMES ADVERTISING - Not available
math students/ calculator users needed
Calculator Gaming
Programming
TIMESTAMP display format help
PHP beginner help!!!
Calculus Help
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.