•
|
•
|
prefix (with one argument on its right side, such as !a for logical negation)
|
•
|
Net Income After Taxes = Net Income - Taxes;
Assign( Net Income After Taxes, Subtract( Net Income, Taxes ) );
The assignment operation can be written either as the Assign() function or as an infix operator =. Similarly, subtraction can be done with the Subtract() function or the infix minus sign; they are equivalent inside JMP.
Note: Usually white space is ignored in JSL, so that “netincomeaftertaxes” and “net income after taxes” are the same thing. There is one exception: the two-character operators must not have a space between characters. Always enter the following operators without spaces in between:
||, |/, <=, >=, !=, ==, +=, -=, *=, /=, ++, --, <<, ::, :*, :/, /*, */ |
Another common operator is the semicolon ( ; ). You use the semicolon to:
•
|
An expression can contain more than one operator. In these instances, the operators are grouped in order of precedence with decreasing priority. For example, * takes precedence over +:
a + b * c
+ takes precedence over -:
a + b * c - d
So b * c is evaluated, and then the result is added to a. d is then subtracted from the result of a + b * c.
Table 4.3 shows operators shaded in order of precedence and each operator’s function equivalent.