DPS Telecom NetGuardian AAR HC User Manual page 46

Table of Contents

Advertisement

42
+ Addition
- Subtraction
* Multiplication
/ Division
1
> Greater than
< Less than
2
| Conditional Halt
1. Division is NOT executed if the denominator's absolute value is less than 1!
2. An equation is evaluated until it reaches the Conditional Halt. If the running value at that point is zero, then the
evaluation stops, otherwise the evaluation continues as a new equation.
How equations are evaluated:
Calculations are performed from left-to-right until the end of the equation is reached. As the equation is parsed, each
token's value is pushed onto a stack until an operator is found. When an operator is found, the previous 2 values are
popped from the stack and are used to perform the operation (the first item popped is the SECOND operand). The
result of the operation is then pushed onto the stack. This repeats until the end of the equation is reached. An
equation is valid only if there is exactly ONE item left in the stack when the end of the equation is reached.
Example of how an equation is evaluated:
Input
Operation
a8
Push value
a5
Push value
a6
Push value
+
Add
*
Multiply
a4
Push value
-
Subtract
In this example, after the subtraction there is only ONE item left in the stack (which is the result of all of the
Equation: a8 a5 a6 + * a4 -
Stack
a8
a5
a8
a6
a5
a8
(a5+a6)
Pop a6 and a5, add them, push result to stack
a8
a8*(a5+a6)
Pop (a5+a6) and a8, multiply them, push result to stack
a4
a8*(a5+a6)
a8*(a5+a6) - a4 Pop a4 and a8*(a5+a6), subtract them, push result to stack
previous computations), mak ing this a valid equation.
Comment

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the NetGuardian AAR HC and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Netguardian aar mcNetguardian aar lcD-pk-ngaar

Table of Contents