The "Unknown:"s below indicate that an entry is incomplete.
do ... end(1) | block (grouping statements, especially when statements are not expressions) |
--[[ ... ]] | commenting (nestable) |
-- | commenting (until end of line) |
< > <= >= | comparison |
min / max | comparison (min / max (binary or more)) |
== ~= | equality / inequality (shallow) |
collectgarbage | force garbage collection |
( ... ) | grouping expressions |
dostring | runtime evaluation |
case-sensitive | tokens (case-sensitivity (keywords, variable identifiers...)) |
= | variable assignment or declaration (assignment) |
Unknown:
documentation comment
information about the current line and file
tokens (what is the standard way for scrunching together multiple words)
tokens (variable identifier regexp)
breaking lines (useful when end-of-line and/or indentation has a special meaning)
function(a, b) ... end | anonymous function |
f(a,b,...) | function call |
f() | function call (with no parameter) |
function f(para1, para2) ... code ... end | function definition |
return(2) | function return value (breaks the control flow) |
Unknown:
function called when a function is not defined (in dynamic languages)
runtime inspecting the caller information
/ break | breaking control flow (continue / break) |
return(2) | breaking control flow (returning a value) |
pcall | exception (catching) |
error | exception (throwing) |
error | exception (throwing) |
if c then ... end | if_then |
if c then b1 else b2 end | if_then_else |
repeat ... until c | loop (do something until condition) |
for i = 10, 1, -1 do ... end | loop (for each value in a numeric range, 1 decrement) |
for i = 1, 10 do ... end | loop (for each value in a numeric range, 1 increment (see also the entries about ranges)) |
for i = 1, 10, 2 do ... end | loop (for each value in a numeric range, free increment) |
while c do ... end | loop (while condition do something) |
nothing, optionally ; | sequence |
end-of-line | sequence |
Unknown:
loop (for "a la C" (while + initialisation))
object:method(para) | method invocation |
Unknown:
package scope
declare
import
strchar | ascii to character |
strbyte | character to ascii |
tostring | convert something to a string (see also string interpolation) |
strrep | duplicate n times |
sub | extract a substring |
find | locate a substring |
[[ ... ]] | multi-line |
simple print (on any objects) | |
format | sprintf-like |
.. | string concatenation |
== ~= | string equality & inequality |
# | string size |
"\n" | strings (end-of-line (without writing the real CR or LF character)) |
'...' | strings (with no interpolation of variables) |
"..." | strings (with no interpolation of variables) |
[[ ... ]] | strings (with no interpolation of variables) |
upper / lower(3) | upper / lower case character |
strupper / strlower | upper / lower case character |
strupper / strlower | uppercase / lowercase / capitalized string |
Unknown:
strings (with interpolation of variables)
serialize (marshalling)
unserialize (un-marshalling)
accessing n-th character
locate a substring (starting at the end)
false | false value |
nil | false value |
not(4) | logical not |
or / and | logical or / and (short circuit) |
Boolean | type name |
Unknown:
true value
foreach | for each element do something |
foreachi | iterate with index |
{ a, b, c }(5) | list constructor |
getn | list size |
# | list size |
a[i] | list/array indexing |
sort(6) | sort |
Unknown:
list concatenation
list flattening
adding an element at the beginning (list cons)
adding an element at index
adding an element at the end
first element
all but the first element
last element
get the first element and remove it
get the last element and remove it
is an element in the list
smallest / biggest element
join a list of strings in a string using a glue string
remove duplicates
reverse
h[k] | dictionary (access: read/write) |
h.k | dictionary (access: read/write) |
{ a = b, c = d } | dictionary (constructor) |
nil | optional value (null value) |
v | optional value (value) |
. | record (selector) |
a, b, c | tuple constructor |
Unknown:
computable tuple (these are a kind of immutable lists playing a special role in parameter passing) (empty tuple)
computable tuple (these are a kind of immutable lists playing a special role in parameter passing) (1-uple)
computable tuple (these are a kind of immutable lists playing a special role in parameter passing) (using a tuple for a function call)
reference (pointer) (creation)
reference (pointer) (dereference)
optional value (null coalescing)
dictionary (has the key ?)
dictionary (remove by key)
dictionary (list of keys)
dictionary (list of values)
dictionary (merge)
range
^ | exponentiation (power) |
log10 | logarithm (base 10) |
log | logarithm (base e) |
mod | modulo (modulo of -3 / 2 is -1) |
sqrt / exp / abs | square root / e-exponential / absolute value |
sin / cos / tan | trigonometry (basic) |
/ round / floor / ceil | truncate / round / floor / ceil |
/ / floor / ceil | truncate / round / floor / ceil |
Unknown:
numbers syntax (integers)
numbers syntax (integers in base 2, octal and hexadecimal)
numbers syntax (floating point)
addition / subtraction / multiplication / division
negation
random (random number)
random (seed the pseudo random generator)
operator priorities and associativities
trigonometry (inverse)
bitwise operators