mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
Update Julia variable names
Julia supports underscores at the beginning of a variable name now. It also supports a subset of Unicode code points for the first character, and additional code points for subsequent characters. A full explanation of all available code points was excluded as it is quite complicated and doesn't add much value in the X in Y context. closes #516
This commit is contained in:
parent
66bc42e31b
commit
56e8508a30
@ -117,11 +117,11 @@ catch e
|
||||
println(e)
|
||||
end
|
||||
|
||||
# Variable names start with a letter.
|
||||
# Variable names start with a letter or underscore.
|
||||
# After that, you can use letters, digits, underscores, and exclamation points.
|
||||
SomeOtherVar123! = 6 # => 6
|
||||
|
||||
# You can also use unicode characters
|
||||
# You can also use certain unicode characters
|
||||
☃ = 8 # => 8
|
||||
# These are especially handy for mathematical notation
|
||||
2 * π # => 6.283185307179586
|
||||
|
Loading…
Reference in New Issue
Block a user