
13. Program Support Functions
13.4 Variable Commands
294
13.4 Variable Commands
Function and purpose
Programming can be endowed with flexibility and general-purpose capabilities by designating
variables, instead of giving direct numerical values to particular addresses in a program, and by
assigning the values of those variables as required when executing a program.
Command format
#
ΔΔΔ
= or #
ΔΔΔ
= [formula]
Detailed description
(1) Variable
expressions
Example
(a) #m
(b) # [f]
m = value consisting of 0 to 9
f = one of the following in the formula
Numerical value m
Variable
Formula operator formula
−
(minus) formula
[Formula]
function [formula]
#100
# [-#120]
123
#543
#110+#119
-#120
[#119]
SIN [#110]
(Note 1)
The 4 standard operators are +,
−
,
∗
and /.
(Note 2)
Functions cannot be used unless the user macro specifications are available.
(Note 3)
Error "P241" results when a variable number is negative.
(Note 4)
Examples of incorrect variable expressions are given below.
Incorrect
Correct
#6/2
→
#[6/2] (Note that expression such as "#6/2" is regarded as
"[#6] /2")
#- -5
→
#[- [-5]]
#- [#1]
→
#[-#1]