So let's say that I have a string of text with "Then chaos ensued..." and I want to display it character by character using, for example, the following 84+CSE BASIC code:


Code:
"Then chaos ensued..."
For(Z,1,21
Output(1,Z,Sub(Ans,Z,1
For(X,0,200
End
End


Then how would I make sure that SourceCoder doesn't parse "Then " and "..." as the Then instruction nor the ... token? I know that to prevent pi from being parsed as the pi symbol you can use [p]i instead, but I cannot seem to find any equivalent code distinguishing specific tokens from individual lowercase letters in the list of tokens/instructions and I did a forum search for "Sourcecoder lowercase problem" without the quotes, to no avail.

Another thing I have tried to ensure that the three dots are displayed as separate characters was to edit the code on-calc, then upload the file to SourceCoder, but then when exporting to the calc after saving my project the ellipsis token was back.

Thanks in advance.
Quote:
Then how would I make sure that SourceCoder doesn't parse "Then " and "..." as the Then instruction nor the ... token? I know that to prevent pi from being parsed as the pi symbol you can use [p]i instead, but I cannot seem to find any equivalent code distinguishing specific tokens from individual lowercase letters in the list of tokens/instructions and I did a forum search for "Sourcecoder lowercase problem" without the quotes, to no avail.
It's easy! Just use the backslash character: Th\en, p\i, m\u, ..\., and so on. The backslash character forces a token boundary, so if you separate the h and the e in "Then", all four characters will be separate tokens, because "Th" and "en" aren't tokens either. Makes sense? Smile
Welp, why didn't I think about this? >.< Thanks for the suggestion. Smile I wonder if this could be a nice addition somewhere on the SC page in case people need help about it?

EDIT: Much better (although from entirely different program)

Before


After
  
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