The Freya Programming Language

Increment/decrement statements

See also

Freya provides postfix increment and decrement statements as C/C++/C# do. However, these special statements cannot be used as expressions.

Syntax

Both statements modifies the value of a variable, field or property:

left-value ++
left-value --

The above statements are considered equivalent to these:

left-value += 1;
left-value -= 1;

left-value must be a reference to a variable, field or writable property with integer or enumerative type.

See also

The Freya Programming Language
Statements
Assignments
Method calls
Expressions