Hi All
when I try to do the following either in a program or from a calculator page:
{b,c,g,$,a} → lst1
I get a message: syntax OK
If I do the following:
{b,c,g,a} → lst1 works fine, as it should.
Obviously the $ symbol in the first list is the cause of the problem or any similar symbol from the catalogue.
Is there a way to store a list containing some of these special symbols to a user variable?
Any help would be greatly appreciated.
Regards
tgahan
Lists in nspire basic are numeric only (its not like a javascript array). When you put letters, the calc interprets them as variables. Since "$" isn't a number or a variable, you won't be able to store it to a list. However, you could use the mid() command to get the nth character from a string though. So something like this will return a character based on an index (which is what I think you are trying to do)

Code:
mid("bcg$a",n,1)

Where n is the index of the character you want.
Hi mr womp womp
Yes this will do what I want.
Thank you.
tgahan
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement