Global Statement (Global); Extern Statement (Extern) - HEIDENHAIN iTNC 530 HSCI Technical Manual

Hide thumbs Also See for iTNC 530 HSCI:
Table of Contents

Advertisement

9.15.2 GLOBAL statement (GLOBAL)

9.15.3 EXTERN Statement (EXTERN)

1848
GLOBAL <Label, declaration beyond the file boundary>
Syntax:
None
Operands:
Action:
There is no limit to the number of labels in each file linked with USES. To
enable a module that was defined in a file to be called from another file, you
must declare the module to be global. This is done by entering the GLOBAL
statement at the beginning of the file. You can set labels globally only if they
are defined with LBL (and not with KFIELD!) later on in the program.
The main program must not contain any GLOBAL definitions. A single label
cannot be declared global by more than one module. However, a name that is
declared global in file A can be used again locally in file B. The number of labels
is not limited.
EXTERN <Label, a module from another file can now be called
Syntax:
with a CM command>
None
Operands:
Action:
To enable a label in one file to access modules that other files have declared
as GLOBAL, you must declare the label with EXTERN. You must write the
EXTERN statement at the beginning of the file. In the program code you can
then jump to this label with the commands CM, CMT and CMF.
The following functions are not permitted with external labels:
JP, JPF, JPT
Access to a constants field
Linking a CM statement in a CASE branch
The name of the external label cannot be used again as a local label in the
same file.
HEIDENHAIN Technical Manual iTNC 530 HSCI

Advertisement

Table of Contents
loading

Table of Contents