13. Program Support Functions
Sequence of arithmetic operations
(1) The sequence of the arithmetic operations (1) through (3) is, respectively, the functions
followed by the multiplication arithmetic followed in turn by the addition arithmetic.
#101 = #111 + #112∗SIN[#113]
(2) The part to be given priority in the operation sequence should be enclosed in square
parentheses. Up to 5 pairs of such parentheses including those for the functions may be used.
#101 = SQRT [ [ [ #111 = #112 ] ∗SIN[#113] + #114] ∗#15] ;
Examples of arithmetic commands
(1) Main Program and
argument
designation
(2) Definition and
substitution (=)
(3) Addition and
subtraction (+,−)
(4) Logical sum (OR)
(5) Exclusive OR
(XOR)
(1) Function
(2) Multiplication arithmetic
(3) Addition arithmetic
First pair of parentheses
Second pair of parentheses
Third pair of parentheses
G65 P100 A10 B20.;
#101 = 100.000 #102 =
200.000 ;
#1 = 1000
#2 = 1000.
#3 = #101
#4 = #102
#5 = #5041
#11 = #1 + 1000
#12 = #2 – 50.
#13 = #101 + #1
#14 = #5041 – 3.
#15 = #5041 + #102
#3 = 100
#4 = #3OR14
#3 = 100
#4 = #3XOR14
220
13.5 User macro specifications
#1
10.000
#2
20.000
#101
100.000
#102
200.000
#1
1000.000
#2
1000.000
#3
100.000
#4
200.000
−10.000
#5
#11
2000.000
#12
950.000
#13
1100.000
−13.000
#14
#15
190.000
#3 = 01100100
14 = 00001110
#4 = 01101110 = 110
#3 = 01100100
14 = 00001110
#4 = 01101010 = 106
From common
variables
From offset
amount