first:
how would you have someone insert a number.

second:
how do you make a for loop.
I believe the first would be:

?->var
willrandship wrote:
I believe the first would be:

?->var

could you put for example "dergree" in front of the question mark?
for loops:

Syntax:


Code:

For <int> -> <var> to <int> [step <int>]
...code...
Next


Example:

Code:

For 1 -> I to 10 step 1
Locate 1,1,I
Next   //Displays I until I = 10


I hope that was easy to understand Smile

EDIT:

krazylegodrummer56 wrote:
willrandship wrote:
I believe the first would be:

?->var

could you put for example "dergree" in front of the question mark?


You can do this:

Code:

"TEXT"? -> <var>


Example:

Code:

Code:

"ENTER A NUMBER"? -> A


Display:

Code:

ENTER A NUMBER?
| (User input line)
flyingfisch wrote:
for loops:

Syntax:


Code:

For <int> -> <var> to <int> [step <int>]
...code...
Next


Example:

Code:

For 1 -> I to 10 step 1
Locate 1,1,I
Next   //Displays I until I = 10


I hope that was easy to understand Smile


what I'm trying to do is make a program in ti basic and turn it into casio basic.

this is the program I am trying to port over.
http://www.ticalc.org/archives/files/fileinfo/423/42305.html
I cant read the source, dont have a ti calc. But did you understand my last post? questions?
A little bit. I'm looking at Casio's 601 page manual in the program section for help and so far it is helping a bit.

how would you display an answer once after doing some math bit and then display another answer after that?
I am having problems with this code.

Casio BASIC code:

Code:
Clrtext
Lbl A
Clrtext
Menu "Snake", "Play", 1, "Ultimate Game",4,"Highscores",2,"Quit",3


That is the part where it sends me when I click an option(any option).
Which line exactly? Also, why are you ClrText'ing two lines in a row like that? And have you checked that the syntax for Menu goes like that?
The error is at the end of the menu code.
Space in front of the 1 and in front of "Play" spence
That was probably an accident while typing here. That error probably wasn't in the code on my calc.
LBL's 1,2,3, and 4 after the menu then? becuse It looks fine to me.
I figured it out. I didn`t put any lbls after. Now something in the lbl is messed up, and I don't know what. Will post code.

Code:
Lbl R
0→L
Cls
AxesOff
Horizontal -62
Vertical 94
For X,0,Q
IfEnd
26→R
48→B
32→A
While PxlTest(Ans,B)=2
PxlOn Ans,B
If Ans=62 Or Ans=0 Or B=94 Or B=0
Then
Goto S
IfEnd


I'm not sure what's wrong.
Spenceboy98 wrote:
I figured it out. I didn`t put any lbls after. Now something in the lbl is messed up, and I don't know what. Will post code.

Code:
Lbl R
0→L
Cls
AxesOff
Horizontal -62
Vertical 94
For X,0,Q
IfEnd
26→R
48→B
32→A
While PxlTest(Ans,B)=2
PxlOn Ans,B
If Ans=62 Or Ans=0 Or B=94 Or B=0
Then
Goto S
IfEnd


I'm not sure what's wrong.

number one For loop is wrong.
number two is this for one of the menu items? if yes you need the Lbl the same as the "Goto"

Code:

Menu  "title", "option 1" , 1, "option 2", 2
Lbl  1
//Code
Lbl  2
//Code

A menu example^
I'm interested that it gives a Syntax error, though; the TI calculators call that ERR: LABEL. Ah well, now we know for helping other users. Smile
How do I fix The For loop?
Spenceboy98 wrote:
How do I fix The For loop?
Are you really trying to end the For loop with an IfEnd instead of a ForEnd, or am I misreading your code?


Code:
For X,0,Q
IfEnd
Note, it's not ForEnd, it's Next.
I change it to Next. Any errors after that one? I'm trying to adapt code from a game on my 84+SE. Do you want me to post the original code?
  
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
Page 1 of 3
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement