REPORTER 22.1
Example 3: Setting a Character Variable According to the Result of a Calculation
Example 3: Setting a character variable according to the result of a calculation
Problem
Input variable = PERCENT
If (abs(PERCENT) < 5.0) then new variable RESULT = 'OK'
otherwise 'not OK'
Solution
JavaScript |
var result; |
Discussion
This uses exactly the same methods as examples 1 and 2. The only difference is that the value used in the Variable constructor is a character string, not a number.
The source code for this example is available here .