Punctuation
Extended documentation for mathematical symbols & functions is here.
symbol | meaning |
---|---|
|
the at-sign marks a macro invocation; optionally followed by an argument list |
an exclamation mark is a prefix operator for logical negation ("not") |
|
|
function names that end with an exclamation mark modify one or more of their arguments by convention |
|
the number sign (or hash or pound) character begins single line comments |
|
when followed by an equals sign, it begins a multi-line comment (these are nestable) |
|
end a multi-line comment by immediately preceding the number sign with an equals sign |
|
the dollar sign is used for string and expression interpolation |
the percent symbol is the remainder operator |
|
the caret is the exponentiation operator |
|
single ampersand is bitwise and |
|
double ampersands is short-circuiting boolean and |
|
single pipe character is bitwise or |
|
double pipe characters is short-circuiting boolean or |
|
the unicode xor character is bitwise exclusive or |
|
the tilde is an operator for bitwise not |
|
|
a trailing apostrophe is the |
the asterisk is used for multiplication, including matrix multiplication and string concatenation |
|
forward slash divides the argument on its left by the one on its right |
|
backslash operator divides the argument on its right by the one on its left, commonly used to solve matrix equations |
|
|
parentheses with no arguments constructs an empty |
|
parentheses with comma-separated arguments constructs a tuple containing its arguments |
|
parentheses with comma-separated assignments constructs a |
|
parentheses can also be used to group one or more semicolon separated expressions |
|
array indexing (calling |
|
vector literal constructor (calling |
|
vertical concatenation (calling |
|
with space-separated expressions, horizontal concatenation (calling |
|
curly braces following a type list that type’s parameters |
|
curly braces can also be used to group multiple |
|
semicolons separate statements, begin a list of keyword arguments in function declarations or calls, or are used to separate array literals for vertical concatenation |
|
commas separate function arguments or tuple or array components |
|
the question mark delimits the ternary conditional operator (used like: |
|
the single double-quote character delimits |
|
three double-quote characters delimits string literals that may contain |
|
the single-quote character delimits |
|
the backtick character delimits external process ( |
|
triple periods are a postfix operator that "splat" their arguments' contents into many arguments of a function call or declare a varargs function that "slurps" up many arguments into a single tuple |
|
single periods access named fields in objects/modules (calling |
|
periods may also prefix parentheses (like |
|
colons ( |
|
colons ( |
|
when used by themselves, |
|
double-colons represent a type annotation or |
|
quoted expression |
|
|
subtype operator |
|
supertype operator (reverse of subtype operator) |
|
|
single equals sign is assignment |
double equals sign is value equality comparison |
|
triple equals sign is programmatically identical equality comparison |
|
right arrow using an equals sign defines a |
|
|
right arrow using a hyphen defines an anonymous function on a single line |
pipe operator passes output from the left argument to input of the right argument, usually a function |
|
|
function composition operator (typed with \circ{tab}) combines two functions as though they are a single larger function |
|
underscores may be assigned values which will not be saved, often used to ignore multiple return values or create repetitive comprehensions |