An expression can be one of the following:
Expressions can be grouped using parentheses, and may be recursive, meaning that an expression can consist of subexpressions.
An arithmetic expression is any combination of numeric operands and an arithmetic operator or a bitwise operator.
a + b
c++
m << 1
An assignment expression consists of a variable on the left side of an assignment operator, and an expression on the right side.
a = x + 42
b += c
s = "Hello"
A string expression is any combination of string and char operands and a string operator.
s + ".brd"
t + 'x'
A comma expression is a sequence of expressions, delimited by the comma operator.
Comma expressions are evaluated left to right, and the result of a comma expression is the type and value of the rightmost expression.
i++, j++, k++
A conditional expression uses the conditional operator to make a decision within an expression.
int a;
// ...code that calculates 'a'
string s = a ? "True" : "False";
A function call transfers the program flow to a user defined function or a builtin function. The formal parameters defined in the function definition are replaced with the values of the expressions used as the actual arguments of the function call.
int p = strchr(s, 'b');