
B-63484EN/05 10.EXTENDED SYMBOL/COMMENT FUNCTION
- 331 -
10.1.1 Relation between the Global Symbol and the Local Symbol
The relation between the global symbol and the local symbol is
described below.
Fig. 10.1.1 (a)
Comparison
Prog.
Attribute
Effective range
Non-Extended
function
Extended
function
1. Global Symbol can be used in all subprograms
Available
All symbols are global
Available
2. Local
Symbol can be used only in one associated
subprogram among LEVEL1, LEVEL2, LEVEL3,
and P1 to Pn
Not available
Available
As the scope of symbol is limited if the local attribute is specified,
same symbol names can be defined and used in different modules
without conflicts. The allowed combinations of symbol and associated
address are checked as follows.
(a) The symbol is the same and the address is different.
Fig. 10.1.1 (b)
Case Conditions Example Result
a.1
Global symbol is the same and the address is
different
ABC
ABC
R0
R2
; Global symbol
; Global symbol
(X)
a.2
Global symbol is the same as local symbol and
the address is different
ABC
ABC
R0
R2
; Global symbol
; Local symbol(P1)
(X)
a.3
Local symbol is the same as other local symbol
and the address is different
ABC
ABC
R0
R2
; Local symbol(P1)
; Local symbol(P2)
(O)
a.4
Symbol is the same within local symbol and the
address is different
ABC
ABC
R0
R2
; Local symbol(P1)
; Local symbol(P1)
(X)
(O): The definition is allowed. (X): The definition is not allowed.
(b) The symbol is different and the address is the same.
Fig. 10.1.1 (c)
Case Conditions Example Result
b.1
Global symbol is different and the address is
the same
ABC
ABCD
R2
R2
; Global symbol
; Global symbol (Note)
(O)
b.2
Global symbol is different to local symbol and
the address is the same
ABC
ABCD
R2
R2
; Global symbol
; Local symbol(P1) (Note)
(O)
b.3
Local symbol is different to other local symbol
and the address is the same
ABC
ABCD
R2
R2
; Local symbol(P1)
; Local symbol(P2)
(O)
b.4
Symbol is different within local symbol and the
address is the same
ABC
ABCD
R2
R2
; Local symbol(P1)
; Local symbol(P1) (Note)
(O)
NOTE
When you decompile the ladder object, it does not
get back to the original symbol.