The "Missing:"s below indicate that an entry is incomplete.
| { ... } (9) | 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 (non nestable) |
| // | commenting (until end of line) |
| < > <= >= | comparison |
| min / max | comparison (min / max (binary or more)) |
| == != | equality / inequality (deep) |
| == != | equality / inequality (shallow) |
| ( ... ) | grouping expressions |
| __LINE__ __FILE__ | information about the current line and file |
| case-sensitive | tokens (case-sensitivity (keywords, variable identifiers...)) |
| usually underscores | tokens (if case sensitive, what is the standard way for scrunching together multiple words) |
| [_a-zA-Z][_a-zA-Z0-9]* | tokens (variable identifier regexp) |
| = | variable assignment or declaration (assignment) |
Missing:
documentation comment
| f(a,b,...) | function call |
| f() | function call (with no parameter) |
| typ0 f(typ1 para1, typ2 para2, ...) { ... } | function definition |
| void f(typ1 para1, typ2 para2, ...) { ... } | function definition (procedures) |
| return | function return value (breaks the control flow) |
| continue / break | breaking control flow (continue / break) |
| goto | breaking control flow (goto (unconditional jump)) |
| return | breaking control flow (returning a value) |
| try a catch (exn) b | exception (catching) |
| throw | exception (throwing) |
| if (c) b | if_then |
| if (c) b1 else b2 | if_then_else |
| c ? b1 : b2 | if_then_else |
| do {expr} while (!cond) | loop (do something until condition) |
| for | loop (for "a la C" (while + initialisation)) |
| while (cond) expr | loop (while condition do something) |
switch (val) {
case v1: expr1; break;
case v2: case v3: expr23; break;
default: expr_else;
} | multiple selection (switch) |
| , | sequence |
| ; | sequence |
Missing:
loop (for each value in a numeric range, 1 increment (see also the entries about ranges))
loop (for each value in a numeric range, 1 decrement)
loop (for each value in a numeric range, free increment)
| t v | annotation (or variable declaration) |
| (t) e | cast (computed conversion (calls an internal or a user-defined function)) |
| t(e) | cast (computed conversion (calls an internal or a user-defined function)) |
| dynamic_cast<t>(e) | cast (downcast (need runtime checking)) |
| (t) e | cast (upcast) |
| static_cast<t>(e) | cast (upcast) |
| typedef t n | declaration |
| const T | mutability, constness (type of a constant value) |
| it is the default | mutability, constness (type of a mutable value) |
| class | class declaration |
| this | current instance |
| typeid | get the type/class corresponding to an object/instance/value |
| class child : parent | inheritance |
| delete | manually call an object's destructor |
| object.method(para) | method invocation |
| object->method(para) | method invocation |
| object.method() | method invocation (with no parameter) |
| o2 = o (44) | object cloning |
| new class_name(...) | object creation |
| class_name v(...) | object creation |
| dynamic_cast | testing class membership |
| namespace p { ... } | declare |
| using namespace p; | import (everything into current namespace) |
| using p::name1; using p::name2; ... | import (selectively) |
| :: | package scope |
| s[n] | accessing n-th character |
| at (61) | accessing n-th character |
| (char) c | ascii to character |
| 'z' | character "z" |
| (int) c | character to ascii |
| char | character type name |
| substr | extract a substring |
| rfind | locate a substring (starting at the end) |
| printf | simple print (printf-like) |
| sprintf | sprintf-like |
| + | string concatenation |
| == != | string equality & inequality |
| length | string size |
| size | string size |
| "\n" | strings (end-of-line (without writing the real CR or LF character)) |
| "..." | strings (verbatim) |
| char const[] | type name |
| string | type name |
| toupper / tolower | upper / lower case character |
Missing:
strings (with interpolation)
multi-line
serialize (marshaling)
unserialize (un-marshaling)
locate a substring
| NULL / 0 / '\0' / false | false value |
| ! | logical not |
| || / && | logical or / and (short circuit) |
| true / anything not false | true value |
| bool | type name |
| push_front | adding an element at the beginning (list cons) (side-effect) |
| push_back | adding an element at the end (side-effect) |
| find find_if | find an element |
| begin | first element (iterator) |
| for_each | for each element do something |
| { a, b, c } (67) | list constructor |
| size | list size |
| a[i] | list/array indexing |
| at (61) | list/array indexing |
| unique (74) | remove duplicates |
| reverse | reverse |
| reverse_copy | reverse |
| min_element / max_element | smallest / biggest element |
| sort | sort |
| transform | transform a list (or bag) in another one |
| transform | transform two lists in parallel |
Missing:
type name
adding an element at index
join a list of strings in a string using a glue string
| h[k] | dictionary (access: read/write) |
| find (83) | dictionary (has the key ?) |
| erase | dictionary (remove by key) |
| 0 | optional value (null value) |
| v | optional value (value) |
| . | record selector |
| -> | record selector |
| & | reference (pointer) (creation) |
| * (78) | reference (pointer) (dereference) |
| -> (80) | reference (pointer) (dereference) |
Missing:
dictionary (type name)
| + / - / * / / | addition / subtraction / multiplication / division |
| & / | / ^ | bitwise operators (and / or / xor) |
| << / >> | bitwise operators (left shift / right shift / unsigned right shift) |
| ~ | bitwise operators (negation) |
| pow | exponentiation (power) |
| log / log10 | logarithm |
| % | modulo (modulo of -3 / 2 is -1) |
| - | negation |
| 1000., 1E3 | numbers syntax (decimals) |
| 07, 0xf | numbers syntax (integers in base 2, octal and hexadecimal) |
| 1000 | numbers syntax (integers) |
| mathematical | operator priorities and associativities (addition vs multiplication) |
| sqrt / exp / abs | square root / e-exponential / absolute value |
| sin / cos / tan | trigonometry (basic) |
| asin / acos / atan (88) | trigonometry (inverse) |
| trunc / round / floor / ceil | truncate / round / floor / ceil |
Missing:
type name
random (random number)
random (seed the pseudo random generator)