Indeed, for some obscure reason TI decided that "+" would be a good concatenation character, even though it eliminates the possibility of deriving ascii values from characters.
But "1->sub(Str1,4,1 would probably cause problems when it is put on a two-byte token or vice versa with "[A]->sub(Str1,4,1
Maybe TI didn't want to deal with that...
Gah... More string problems... I need to check if Str1 was made from within my program (or just in the correct format). When I try...

Code:
:If length(Str1)>=10

...it says "ERR: UNDEFINED" if Str1 isn't there.
Is there anyway to check if Str1 exists?
Not without an asm program, unfortunately.
No, the only thing you can do is add some text and a yes no option to let the user that that string will be overwritten...
Oh, okay. Thanks, guys.
If you want to save a string for the next time you run your program, convert it to a list. This topic has some ways to do that.
foamy3 wrote:
Gah... More string problems... I need to check if Str1 was made from within my program (or just in the correct format). When I try...

Code:
:If length(Str1)>=10

...it says "ERR: UNDEFINED" if Str1 isn't there.
Is there anyway to check if Str1 exists?
And by the way:

Code:
If 11>length(Str1
See, one byte less, and quite a bit faster since you're only doing a <, not >=.
Actually, that would be:

Code:

:If 9<length(Str1
calc84maniac wrote:
Actually, that would be:

Code:

:If 9<length(Str1
OH yeah, I was thinking that he wanted to know if the string was at most 10 characters, not at least 10 characters. My bad.
  
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 2 of 2
» 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