Unicode variable names
- Describe, and give a pointer to documentation on your languages use of characters beyond those of the ASCII character set in the naming of variables.
- Show how to:
- Set a variable with a name including the 'Δ', (delta character), to 1
- Increment it
- Then print its value.
Protium
1. (working on it)
2. <lang protium><@ LETVARLIT>Δ|1</@> <@ ACTICRVAR>Δ</@> <@ SAYVAR>Δ</@></lang>
Using what Google Translate says is the Traditional Chinese for 'delta' <lang protium><@ LETVARLIT>三角洲|1</@> <@ ACTICRVAR>三角洲</@> <@ SAYVAR>三角洲</@></lang>
Python
Within the ASCII range (U+0001..U+007F), the valid characters for identifiers are the same as in Python 2.x: the uppercase and lowercase letters A through Z, the underscore _ and, except for the first character, the digits 0 through 9.
Python 3.0 introduces additional characters from outside the ASCII range (see PEP 3131). For these characters, the classification uses the version of the Unicode Character Database as included in the unicodedata module.
Identifiers are unlimited in length. Case is significant.
<lang python>>>> Δx = 1 >>> Δx += 1 >>> print(Δx) 2 >>> </lang>