Come build with us.
Stacks API v6 for Stacks 2.5
%( 1 + 2 )%
%( 1 + 2 )%
%([!] <argument1> <operator> <argument2> )%
!
will perform a logical NOT on the output of the operation<argument1>
and <argument2>
can be any integer value or any property that evaluates to an integer value. Behavior with non-integer values is undefined.<operator>
can be any of: +
, -
, *
, &&
, ||
, >>
, <<
`Math operations for evaluating simple integer functions. The syntax is identical to Integer Comparison. Statements can be nested, but must contain only two arguments.
evaluates to 2
%( 1 + 1 )%
evaluates to 15
%( %( 1 + 2 )% - %( 3 * 4 )% )%
evaluates to true only if both enables are true
%( %id=enable1% && %id=enable2% )%
evaluates to 12
%( 25 >> 1 )%
Note: Since this is integer-only math, there is no divide operator. However the shift-right operator can provide a divide-by-two (see last example).