PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Help?

mikesacchetti · 29 Sep 2002, 03:08 UTC
I know this isnt a calc forum, but i have a quick question reguarding programming in my Casio calculator... If you can help then drop a reply.

:D
if its anything like programing a TI83+, then yes i can help, maybe. :wink:
mikesacchetti · 29 Sep 2002, 03:55 UTC
Well... To get a word to show, the command is this..

Locate x,y "texthere"

that works fine...

When i add

If A=1
Then Locate x,y "texthere"
IfEnd

It only flashes the text for a second, then dissapears.
programming on ti83+ is way different, but i'd say replace the ifend with end or erase it and run it without the ifend.
on ti it would be

If A=1
Disp "text here"
End

or

If A=1
Output (x,y,"text here")
End
Oh, i think if you get rid of the "then" it sould work, you really don't need it since you dont have an "else"
I agree that getting rid of the "then" would help, or at least move the "then" and output commands onto different lines. It may be interpreting them both as one command, but "then" shouldn't have any arguments, causing the interpreter to give you errors.
It sounds like you are using a BASIC type launguage.

My guess would be that somewhere the variable "A" is being turned to 1 and then somewhere else is being turned to 0 or some other value. That would cause the text to appear then dissapear. Check all your code that involves the variable A and the values that are put into it. Maybe you are defining A as two or more different values. Like somewhere it will say A=1 an somewhere else it will say A=45 or something. Or maybe somewhere you are saying If A = 1 Then A = (something else).
oh, I know your problem! I feel stupid for not noticing it before. You have no command telling it to wait... after the output command, etc, you'll need to add something that stalls the program (a for loop, something similar to "pause" on the TI-83, a getkey, etc)
mikesacchetti · 30 Sep 2002, 01:25 UTC
Michael Walker wrote:
oh, I know your problem! I feel stupid for not noticing it before. You have no command telling it to wait... after the output command, etc, you'll need to add something that stalls the program (a for loop, something similar to "pause" on the TI-83, a getkey, etc)


yes thats what im thinking.. i tried using "stop" and "break", they didnt work.. i can always just try all different commands, one has to stall it.
Why not add a for next loop as below;


for i = 1 to 1000
next i

increase the amount of times it will loop by increasing the 1000 value. Its not the most efficient way of coding but i dont know the ins and outs of programming on a casio calculator
"stop" and "break" end the program, so they would actually do the opposite of what you want to do.

As said above, try a for loop. I don't know how it works on the casios, but on my TI-83+ it's:

For(X,1,500)
End

That will automatically run through that 500 times, effectively causing a stall.
Read through your calculator's manual, at the very end it has a list of every single command recognized by your calculator.

try

:while getKy==0
:output(x,y,"text")
:end

Then when a user presses any key it will leave the loop.