Message Boards Message Boards

0
|
1706 Views
|
2 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Unexpected result from StringLength of certain symbols

POSTED BY: David Vasholz
2 Replies

Thank you. Your reply makes sense, but it is misleading for the output of SyntaxLength to depend upon anything other than the string itself, without getting into speculations about what might lie "beyond" the string. No one would be ever be convicted of perjury if the defense can attach the right kind of "addendum" to every questionable statement.

POSTED BY: David Vasholz

This is explained in the documentation:

If SyntaxLength returns a position past the end of the string, it indicates that the string is syntactically correct as far as it goes, but needs to be continued in order to correspond to input for a complete Wolfram Language expression.

which is exactly what we see:

In[6]:= SyntaxLength["("]

Out[6]= 3
POSTED BY: Jason Biggs
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract