2.14.5
Undefined Variables
Variables which
are
not yet
defined
are
called undefined variables. The
variable values of undefined variables
are
(blank)
.
The following falls under the
category
of undefined variables:
(1)
Local variables
and common variables
(#100—
#299)
when the
equipment
has
power on
or
reset.
(2)
Local variables for which
no
arguments
are
specified
when
a
macroprogram
is called.
(3)
Local variables
corresponding
to
the
level of
a macroprogram
when
the
macroprogram returns
by
instruction of M99.
(4)
Local variables and
common
variables in which
no values
have been
stored in
a macroprogram.
(5)
Common variables in which
no
values have been written
by
MDI.
Variable
#0 is
used
a
variable
(undefined
variable)
whose
variable value is
always
(blank).
Variable #0
cannot
be instructed on the left
side of
an
operation
formula.
I
Meaning of
(blank).
(J) When an
underfined variable is
quoted,
the address itself is also
disregarded.
G00X # 2
:
is equivalent
to
GOU
;
.
#2= blank--
#2=0
G00X
#
2
:
is
equivalent
to
GOO X
0
;
.
<2>
When used in
an operation
formula, undefined variables
are
handled
as
variable value
0
except
when
they are replaced
with '.'blank:-.
•
For #2= .blank-
#3=#2:
#3= .blank-'
#3=# [# 2
+
#
2]
#3=#0=
'blank-
#3=#
I
*#2;
#3=#2+#2;
#3 = 0
#3=#2/#2;
#3=5
*# 2
;
#3 = 2-# 2
;
#3=2
#3=5/#
2
Division error
@
If used in
a
conditional
expression, undefined
variables
are
handled
as
variable value 0
except
•
For
#3=0 and #2= <biank.-
for EQ and NE.
#
3EQ
#
2
is
not
satisfied.
#
3NE
#2
is satisfied.
#3GE
#
3LT
# 2 is
not
satisfied.
-
285 -