is there eof operator in ti-83 basic in many other languages, such c? know programmes terminate when "on" button pressed (much eof operator, ctrl+d, in *nix), haven't been able figure out how operation assigned.
as bad example, have
:prompt str0 :while str0 ≠ "eof" :disp "this code works!" :prompt str0 :end
i want print "this code works!" , prompt str0 until enter key combo ("on" button, i'm guessing) terminates file.
now of course there other ways of expressing code above not rely on eof. i'm trying give simple example of scenario in eof might useful.
if looking way keypad input end program, there no single function, can use getkey
write code it. here example of how make program go until key combination entered, or program broken.
:disp "this code works!" :while getkey ≠ 21 :end :while getkey ≠ 31 :end :while getkey ≠ 45 :end :disp "program ending" :stop
the above code displays "this code works!"
, waits until 2nd, alpha, clear pressed before displaying "program ending" quitting. if unfamiliar getkey
function, recommend this link. luck coding!
Comments
Post a Comment