There are two main parts of the osq syntax: expressions and directives.
Expression are mathematical. For example, "2 + 2" is an expression. "4 * a + f(cos(q * pi)) ^ 2" is an expression, too.
To call an expression, surround the expression with "${}" (excluding the quotes). For example:
You have ${num_cows} cow(s).
That's twice ${num_cows / 2} cow(s).
By default, all expressions use floating-point arithmetic. You aren't restricted to integers.
For more information on expressions and supported data types and operations, see the expressions page.
Directives manipulate blocks of text. They begin with # in the first column of a line.
The directives in osq are:
Documentation for each directive is linked above.