pTAL Reference Manual (H06.08+)

Compiler Directives
HP pTAL Reference Manual523746-006
17-12
Migrating from TNS/R to TNS/E
If some files do not compile successfully because of missing global data declarations,
the source code files were not set up correctly and you must modify one or more of
them.
For example:
1. Suppose that the original SAVEGLOBALS compilation source file is COMP1 in
Example 17-13 on page 17-12.
2. Extract all directives and declarations from the beginning of COMP1 to (but not
including) BEGINCOMPILATION. Put them in a new source file called GLOBALS
(see Example 17-14 on page 17-12).
Example 17-13. Original SAVEGLOBALS Compilation Source File
! COMP1
?FIELDALIGN (SHARED2)
name x;
?source FILE1
?source FILE2
...
?source FILEn
int i1
struct s(*);
begin
...
end;
! All other common declarations and directives in the
! compilation ...
! End of global declarations
?BEGINCOMPILATION
! All nonglobal declarations,
! including procedure declarations
! End of COMP1
Example 17-14. New GLOBALS Source File (page1of2)
! GLOBALS
?FIELDALIGN (SHARED2)
name x;
?source FILE1
?source FILE2
...
?source FILEn
int i1