1 line
662 B
Plaintext
1 line
662 B
Plaintext
REM The order of operations (order precedence) are a set of rules that define which procedures are performed first in order to evaluate an expression, similar to that of mathematics.
|
|
REM In DuckyScript, parenthesis ( ) are required to define the precedence conventions.
|
|
|
|
|
|
VAR $FOO = ( 4 * 10 ) + 2
|
|
|
|
REM The expression ( 4 * 10 ) evalues to 40.
|
|
REM The expression 40 + 2 evalues to 42.
|
|
|
|
|
|
REM If multiple pairs of parentheses are required, the parentheses can be nested.
|
|
|
|
|
|
VAR $FOO = 42
|
|
VAR $BAR = (( 100 * 13 ) + ( $FOO - 5 ))
|
|
|
|
REM The expression 42 - 5 evalues to 37
|
|
REM The expression ( 100 * 13 ) evalues to 1300
|
|
REM The expression 1300 + 37 evalues to 1337 |