I am making a program with ICE. In this program, the player will need to type in the name of an appvar. I am wondering how to take string input in Ice.

Thanks in advance,
Flare2003
The exact same way you do it in TI-Basic:
Quote:

Code:
Input "STRING",VAR
Asks for a user input while displaying "STRING", and stores the value in VAR.

(Citing https://github.com/PeterTillema/ICE/blob/master/docs/commands.html)
I tried this but when I put...

Input "string",Str1

The ICE compiler says, "you have an invalid expression" and doesn't finish compiling.
On what line does it say the invalid expression is? Maybe you have your syntax wrong. But seriously, read this page, it has all the answers: http://petertillema.github.io/ICE/commands.html

Hope you solve your issue! Very Happy
The compiler says the error is on line 25, the same line the code is on. I tried again, and it works with normal variables, but it won't work with strings.
Flare2003 wrote:
The compiler says the error is on line 25, the same line the code is on. I tried again, and it works with normal variables, but it won't work with strings.

ICE is finicky, this statement is correct.
If you want, you can convert the normal variable to a string like this:

Code:
Alloc(length(VAR)+1)→Str1
Copy(Str1,VAR,length(VAR)+1)

However, you are much less likely to have problems if you just use the normal variable to open the AppVar instead of converting it to a string.
This could help:
https://www.cemetech.net/forum/viewtopic.php?p=292258#292258
  
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