Idiomatically determine all the characters that can be used for symbols: Difference between revisions

Content added Content deleted
Line 229: Line 229:
operator symbol and, if numeric, if it is not the first letter of a symbol name.
operator symbol and, if numeric, if it is not the first letter of a symbol name.


For example, x2 is a valid identifier, but 2x is not-- it is interpreted as 2 times the identifier x..
For example, x2 is a valid identifier, but 2x is not-- it is interpreted as 2 times the identifier x. In Julia, the Symbol() function turns a string into a symbolic token. So

So,
<lang julia>
<lang julia>
for i in 1:0x200000 - 1
for i in 1:0x200000 - 1
Line 237: Line 235:
end
end
</lang>
</lang>
works up to 0x200000 but not at Unicode 0x200000.
when run, this loop runs without error up to 0x200000 but not at Unicode symbol numbered 0x200000.



=={{header|Kotlin}}==
=={{header|Kotlin}}==