Global Instruction (Global); Extern Instruction (Uses) - HEIDENHAIN TNC 426 PB/M Technical Manual

Table of Contents

Advertisement

7.14.2 GLOBAL INSTRUCTION (GLOBAL)

7.14.3 EXTERN INSTRUCTION (USES)

7 – 176
Syntax:
GLOBAL <label, declaration beyond the file boundary>
Operands:
None
Action:
Up to 1000 local labels are permitted in every 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
instruction 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. Altogether,
1000 labels may be as defined as global in all modules.
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 instruction 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:
n
JP, JPF, JPT
n
Access to a constants field
n
Linking a CM instruction in a CASE branch
The name of the external label cannot be used again as a local label in the
same file. Every external label reduces the number of local labels that remain
available.
HEIDENHAIN Technical Manual TNC 426, TNC 430

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tnc 430 pa/mTnc 430 mTnc 426 cbTnc 430 caTnc 426 pbTnc 430 pa ... Show all

Table of Contents