Omnimaga
Calculator Community => TI Calculators => TI-BASIC => Topic started by: Munchor on March 09, 2011, 05:35:58 pm
-
Hey there,
I was wondering if I have an array, how to add something to it:
{2,4,6,7,8,142}->myArray
Disp myArray
Disp myArray.count()
I want to add the number 666 to my array how can I do it?
Thanks.
-
In the program, right? :P I think array + {666} should work as an append-style function, but it might not, I'm not sure. I know it does in python and might in C++
-
I think what you're looking for is augment(myArray,{666}).
A way to do it "in-place" is 666→myArray[7]. This might be faster, but I haven't tested.
-
myArray[7] won't work, I tested it.
-
It worked when I tested it. What OS are you using? (I have 2.0.1)
-
It worked when I tested it. What OS are you using? (I have 2.0.1)
I have the same OS, but I did something different, thanks!