I have a list of ASCII values and I would like to name an appvar with those values. How do I turn those numbers into a string so that I can use them with the commands to create variables?
dankcalculatorbro wrote:
I have a list of ASCII values and I would like to name an appvar with those values. How do I turn those numbers into a string so that I can use them with the commands to create variables?
"<HEX code here>"->VAR
ICE should say the string is automatically squished...
PT_ wrote:
No, use Copy(Str0,L1,length(L1)) provided these are 1-byte values.
Does that really work? or are you assuming it was allocated first? or does ICE allocate automatically when copying to Str0-Str9? or did you just assume that it was already allocated?
Some clarification on this would be nice.
beckadamtheinventor wrote:
PT_ wrote:
No, use Copy(Str0,L1,length(L1)) provided these are 1-byte values.
Does that really work? or are you assuming it was allocated first? or does ICE allocate automatically when copying to Str0-Str9? or did you just assume that it was already allocated?
Some clarification on this would be nice.
Read the documentation.
So I used Copy(Str0, POINTER, BYTES) to turn my ASCII values into a string. When I display the string, it shows all of my characters correctly, but also a bunch of random symbols after it. I know C uses null-terminated strings so I assume the issue is that the string is not terminated? I tried copying a 0 to the end of the string (as the ASCII value for null, but I couldn't find an ASCII chart that confirmed control character values for the TI-84, so I don't know if that is correct). I also tried attaching "\0" to the end of the string, but then the "\0" just appeared as text.
Just checked the documentation, which confirms that ICE strings are null-terminated with a 0 byte.
So, my question is: Why are random characters showing up at the end of my string and how do I fix it?
Just checked the documentation, which confirms that ICE strings are null-terminated with a 0 byte.
So, my question is: Why are random characters showing up at the end of my string and how do I fix it?
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
» 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
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