[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Another U2 coup



I'm delighted now to find that U2 can deal with, in effect, arrays. This
means you can use frame MSG to have the program decide which S/G to change
the value of!
E.g., in what I'm working on, I need to change different S/Gs depending on
a varying value. I had to do it by this embarrassing set of ten
conditionals (in XyBasic source code):

 if a = 0 then counter_zero$ = tail$
 if a = 1 then counter_one$ = tail$
 if a = 2 then counter_two$ = tail$
 . . .
 if a = 9 then counter_nine$ = tail$

Now, assuming variable "a" is S/G 01 and tail$ is S/G 10, I can just do:
[JM] 2.MSG:10,[Q2]

Amazing!

Thank you Carl and Robert!

Harry Binswanger
hb@xxxxxxxx