Literals & Comments
Most of this will be familiar to users of other languages, but see particularly string interpolation, code quoting and comments.
Numbers
Integers are any series of digit characters [0-9]
, and are 64-bit by default.
x = 1500
x = 75
A series of digits with a .
is a Float64.
x = 2.0
x = 3.141
Strings
Strings start with "
, and end at the next "
.
s = "Hello, World!"
String interpolation
Code Quote
Code quotations begin at `
, and end at the next `
.
ex = `foo(a, b)`
Symbols
Symbols are quoted variables.
sym = `Foo`
Comments
Single line comments start with #
.
println("Hello, World!") # this is a comment
Multi-line and internal comments start with #|
and end with |#
. They can be nested.
println("Hello, World!") #| This is a
multi line comment |#
3 + #| this is an internal comment |# 4
#| this is a #| nested |# comment |#