Search code examples
ti-basic

How to stop the on button from breaking a program in TI-BASIC


So I made a TI-BASIC program that fakes the calculator's home screen but gives the wrong answer to math equations on purpose. This is the code:

:ClrHome
:Lbl 1
:Input "",A
:Disp rand
:Goto 1

It works great and all and it's fun to trick friends with it, but I would like to make it more sophisticated. For example:
1) How can I get around the automatic breaking of the program when "ON" is pressed,and
2) Are there any other ways to better fake the home screen (like when someone presses an operation without a number before it, it automatically fakes the 'ANS' variable), and how can I write those in the program.

Thanks in advance.


Solution

  • Well to avoid a syntax error by

    like when someone presses an operation without a number before it

    You can store the input as STR1 instead of A