Ternary's exist :[cond; truthy; falsey]
Multiline If statements exist
if[condition
statement1
statement2
statement3
]
Multiline if/else statements do NOT exist, and the work around is to repeat the conditional statement in the negative.
if[condition
statement1
statement2
]
if[~ condition // effectively an else statement
statement1
statement2
]
Spaces sometimes get seen as changing a verb or accessor into a diactic verb. Square brackets (myfunc[param]
) resolve the ambiguity.
Print statements/debugging statements are not well documented. And most variables need to go through the "format" verb ($
) to be printed.
`0:"Hello World"
Hello World
`0:,"Hello ","World" / adds in a trailing new line
Hello World
`0:("Hello"
"World")
When returning from a function return with : nil
or : retval
, or at the very end of the function put retval}
. Note that retval
and }
must be on the same line.