Unicode variable names: Difference between revisions

m
→‎{{header|Wren}}: Changed to Wren S/H
imported>Arakov
m (→‎{{header|Wren}}: Changed to Wren S/H)
 
Line 1,051:
 
The error description refers to the bytes in the UTF encoding of 'Δ' which can't appear (outside a string) in a Wren script.
<syntaxhighlight lang="ecmascriptwren">var a = 3
var b = 2
var delta = a - b // ok
Line 1,064:
{{libheader|Wren-trait}}
However, it is possible to simulate Unicode variable names to some extent by using the ''Var'' class in the above module which stores the names (which can be any valid string) in an internal map.
<syntaxhighlight lang="ecmascriptwren">import "./trait" for Var
 
Var["Δ"] = 1
9,477

edits