The "Unknown:"s below indicate that an entry is incomplete.
foo ... end where foo in { if, loop, ... } | block (grouping statements, especially when statements are not expressions) |
nothing needed | breaking lines (useful when end-of-line and/or indentation has a special meaning) |
-- | commenting (until end of line) |
< > <= >= | comparison |
min / max | comparison (min / max (binary or more)) |
three_way_comparison | comparison (returns 3 values (i.e. inferior, equal or superior)) |
indexing identifier: "..."; | documentation comment |
deep_is_equal | equality / inequality (deep) |
= /= | equality / inequality (shallow) |
is_equal(1) | equality / inequality (shallow) |
full_collect | force garbage collection |
( ... ) | grouping expressions |
case-insensitive | tokens (case-sensitivity (keywords, variable identifiers...)) |
[a-zA-Z][_a-zA-Z0-9]* | tokens (variable identifier regexp) |
underscores, UPPER_CASE for class names | tokens (what is the standard way for scrunching together multiple words) |
:= | variable assignment or declaration (assignment) |
v: t | variable assignment or declaration (declaration) |
Unknown:
information about the current line and file
f(a,b,...) | function call |
f | function call (with no parameter) |
f (para1 : typ1; para2, para3 : typ2; ...) : rettyp is do ... end | function definition |
f (para1 : typ1; para2, para3 : typ2; ...) is do ... end | function definition (procedures) |
Result := val | function return value (setting the result) |
rescue | exception (catching) |
retry | exception (retrying: after catching an exception, tell the snippet to be re-run) |
raise | exception (throwing) |
if c then ... end | if_then |
if c then b1 else b2 end | if_then_else |
if c then b1 elseif c2 then b2 else b3 end | if_then_else |
from init_code until c loop ... incr_statement end | loop (for "a la C" (while + initialisation)) |
from i := 10 until i < 1 loop ... i := i - 1 end | loop (for each value in a numeric range, 1 decrement) |
from i := 1 until i > 10 loop ... i := i + 2 end | loop (for each value in a numeric range, free increment) |
from until not c loop ... end | loop (while condition do something) |
inspect val when v1 then statement1 when v2, v3 => statement23 else statement_else end | multiple selection (switch) |
space | sequence |
: | annotation (or variable declaration) |
v ?= e(2) | cast (downcast (need runtime checking)) |
Unknown:
declaration
Precursor | accessing parent method |
class c inherit p1 p2 ... feature decl decl ... end | class declaration |
Current | current instance |
generator | get the type/class corresponding to an object/instance/value |
class child inherit parent end | inheritance |
object.method(para) | method invocation |
object.method | method invocation (with no parameter) |
o.clone(3) | object cloning |
o.deep_clone | object cloning |
!class_name!constructor_name(...) | object creation |
var ?= val(4) | testing class membership |
inherit c export {NONE} all end | import (everything into current namespace) |
s @ n | accessing n-th character |
from_integer | ascii to character |
'z' | character "z" |
code | character to ascii |
CHARACTER | character type name |
out | convert something to a string (see also string interpolation) |
substring | extract a substring |
substring_index | locate a substring |
last_index_of(5) | locate a substring (starting at the end) |
"...%N% %...%N" | multi-line |
put_string | simple print (on strings) |
+ | string concatenation |
is_equal | string equality & inequality |
length | string size |
count | string size |
"%N" | strings (end-of-line (without writing the real CR or LF character)) |
"..." | strings (with no interpolation of variables) |
STRING | type name |
to_upper / to_lower | upper / lower case character |
to_upper / to_lower | uppercase / lowercase / capitalized string |
Unknown:
serialize (marshalling)
unserialize (un-marshalling)
False | false value |
not(6) | logical not |
or / and | logical or / and (non short circuit (always evaluates both arguments)) |
or else / and then | logical or / and (short circuit) |
True | true value |
BOOLEAN | type name |
put_first | adding an element at the beginning (list cons) (side-effect) |
put_last | adding an element at the end (side-effect) |
first | first element |
do_all | for each element do something |
has | is an element in the list |
last | last element |
+ | list concatenation |
<< a, b, c >> | list constructor |
count | list size |
a @ i | list/array indexing |
min / max | smallest / biggest element |
sort(7) | sort |
ARRAY or LINKED_LIST | type name |
Unknown:
list flattening
iterate with index
remove duplicates
reverse
h@k or h.at(k) | dictionary (access: read) |
put | dictionary (access: write) |
has | dictionary (has the key ?) |
current_keys | dictionary (list of keys) |
content | dictionary (list of values) |
remove | dictionary (remove by key) |
HASH_TABLE | dictionary (type name) |
Void | optional value (null value) |
v | optional value (value) |
. | record (selector) |
Unknown:
optional value (null coalescing)
record (type declaration)
union type declaration
enumerated type declaration
dictionary (constructor)
dictionary (merge)
+ / - / * / / | addition / subtraction / multiplication / division |
& / | / ^ | bitwise operators (and / or / xor) |
not | bitwise operators (bitwise inversion) |
bitnot | bitwise operators (bitwise inversion) |
|<< / |>> | bitwise operators (left shift / right shift / unsigned right shift) |
^ | exponentiation (power) |
log10 | logarithm (base 10) |
log | logarithm (base e) |
\\ | modulo (modulo of -3 / 2 is -1) |
- | negation |
1000., 1.E3 | numbers syntax (floating point) |
1_000, 10_00, 100_0 | numbers syntax (integer thousand-separator) |
1b | numbers syntax (integers in base 2, octal and hexadecimal) |
1000 | numbers syntax (integers) |
mathematical | operator priorities and associativities (addition vs multiplication) |
mathematical | operator priorities and associativities (exponentiation vs negation (is -3^2 equal to 9 or -9)) |
r: RANDOM create r.make r.start r.item | random (random number) |
set_seed | random (seed the pseudo random generator) |
sqrt / exp / abs | square root / e-exponential / absolute value |
sine / cosine / tangent | trigonometry (basic) |
arc_sine / arc_cosine / arc_tangent | trigonometry (inverse) |
/ rounded / floor / ceiling | truncate / round / floor / ceil |
DOUBLE, REAL | type name (floating point) |
INTEGER, INTEGER_8, NATURAL_8... | type name (integers) |