Reputation: 1
While programming a sample program in my TI-84 calculator, I was wondering if there were a way to initialize multiple variables to a single value in one line? I tried doing
0 -> A,B,C,D
However this did not work for the calculator. I know you can do each one on an individual line, but my question is, is it possible to initialize multiple variables to a single value at once in TI-BASIC?
Upvotes: 0
Views: 1479
Reputation: 1735
No, you can't set multiple variables at once with one value. But if you just want them on the same line, you can use a colon like this 0→A:0→B
. If you really feel like it, you could make another program that zeroes out every variable and just call it from within your program like this.
PROGRAM:ZERO
:0→A
:0→B
:0→C
...
PROGRAM:OTHER
:prgmZERO
...
Upvotes: 2
Reputation: 1274
No. You cannot initialize multiple variables to a single value at once in TI-Basic.
However, you can:
DelVar (variable)
and then leaving off the following colon. For example, instead of doing :0->A:0->B:Disp A,B
you can do :DelVar ADelVar BDisp A,B
.Upvotes: 4