Commands : | command |
Facultative elements : | [element] |
lvalue : | variable that can figure at the left of an '=' sign, to which one can affect a value |
rvalue : | variable that figures only at the right of an '=' sign, thas has a value but to which one can NOT affect a value |
module : | result of the compilation of a segment of code encased between brackets { } |
auto | |
break | |
case | |
char | |
const | |
continue | |
default | |
do | |
double | |
else | |
enum | |
extern | |
float | |
for | |
goto | |
if | |
int | |
long | |
register | |
return | |
short | |
signed | |
sizeof | |
static | |
struct | |
switch | |
typedef | |
union | |
unsigned | |
void | |
volatile | |
while |
= |
+ |
- |
* |
/ |
% |
<< , >> |
& |
| |
^ |
< , > , <= , >= , == , != |
&& |
|| |
+= , -= , *= , /= , &= , |= |
unary - |
~ |
! |
unary & |
unary * |
variable ++ |
++ variable |
variable -- |
-- variable |
test?val_true:val_false |
auto | automatic memory mode, also the default mode |
const | constant declaration, this variable will become a rvalue once initialised, with a variable = value ; command |
extern | keyword to make a variable declared in an external module known to our segment of code |
register | this variable will be held in one of the processor registers, thus accelerating the access to it's value |
static | this variable will NOT be discarded when we come out of this module |
volatile | this variable can also be changed from outside this module, an opposite of const |
void | the 'empty' type, used to signify that a pointer doesn't points toward an effective value, or a function has no argument |
char | one-byte character or integer -there is no long or short char- |
int | a bigger sort of integer, usually 2-bytes long -short int: a 2-bytes integer, long int: a 4-bytes integer- |
float | normal precision floating point real number |
double | double precision floating point real number |
|----------------- | member_1 value on sizeof(type_1) bytes |
|----------- | member_2 value on sizeof(type_2) bytes |
| : | : |
|----------- | member_n value on sizeof(type_n) bytes |
|-------------------- | |--------------------------- | |----------- | |-------------------- |
member_1 value on sizeof(type_1) bytes | member_2 value on sizeof(type_2) bytes | ... | member_n value on sizeof(type_n) bytes |
Binary operators: variable1 operator variable2 | |
= | copies the value of the expression on the right into the memory segment designed by the variable on the left |
+ | plus |
- | minus |
* | multiply |
/ | divide |
% | remainder |
<< , >> | binary shift to the right or to the left, the left argument is the number of bits |
& | bitwise and |
| | bitwise or |
^ | exclusive or |
< , > , <= , >= , == , != | comparison operators: less than, more than, less or equal, more or equal, equal, different |
&& | boolean and |
|| | boolean or |
Binary operators: decrementation and incrementation, lvalue operator rvalue | |
+= , -= , *= , /= , &= , |= | takes the value of the left-hand variable, performs the operation denoted by the first character of the symbol on this value and the right-hand variable, then stores the result in the lvalue |
Unary operators: operator variable | |
unary - | opposite |
~ | bitwise two-complement |
! | boolean not: returns 0 for any non-null argument, and 1 otherwise |
unary & | return the adress of the variable, as a pointer |
unary * | return the contents of the memory segment pointed by the variable (variable of type Type *, return of type Type) |
Unary operators: decrement and increment operators | |
variable ++ | returns the value of the variable, then increments the contents of the variable |
++ variable | increments the contents of the variable, then returns the incremented value |
variable -- | returns the value of the variable, then decrements the contents of the variable |
-- variable | decrements the contents of the variable, then returns the decremented value |
Ternary operator | |
test?val_true:val_false | returns val_true if test is non-null, or val_false otherwise |
ifdef | tests if the variable name given as an argument is set |
ifndef | tests if the variable name given as an argument is not set |
ifeq | tests if the variable or constant values given in argument |