Download Print this page

HEIDENHAIN MANUALplus 620 Technical Manual page 1751

Hide thumbs Also See for MANUALplus 620:

Advertisement

8.39 GLOBAL Statement (GLOBAL)
8.40 EXTERN Statement (EXTERN)
January 2012
Syntax:
GLOBAL <Label, declaration beyond the file boundary>
Operands:
None
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.
Syntax:
EXTERN <Label, a module from another file can now be called
with a CM command>
Operands:
None
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.
8.40 EXTERN Statement (EXTERN)
1751

Advertisement

loading