skip to main content

Compiler-Directing Statements : COPY

COPY
Format 1
COPY library-name [ {IN} path-name ] [ SUPPRESS PRINTING]
                  [ REPLACING { { old-text BY new-text                } } ... ] .
Format 2
COPY RESOURCE resource-name  [ {IN} path-name ] 
Syntax rules
1.
The COPY statement must be terminated by a period.
2.
Library-name, path-name and resource-name must be a nonnumeric literals or user-defined words.
3.
COPY statements may be nested in other COPY libraries.
4.
Any one of the COPY statements in this structure can include the REPLACING phrase.
5.
Old-text and new-text may be any of the following:
A.
B.
C.
D.
General rules
Format 1
1.
will search only for MyFile.Cpy.
will search first for MyFile.Cpy and then for MYFILE.CPY.
 
The file extension is converted to upper-case along with the file name only if specified in the source code. File extensions specified through -ce=Ext1... compiler option are left unchanged. For example, having
and compiling with -ce=Cpy will search first for MyFile.Cpy and then for MYFILE.Cpy.
2.
3.
4.
A.
B.
C.
i.
ii.
iii.
iv.
v.
vi.
vii.
D.
E.
F.
To make use of this, delimit the substring that will be replaced in the COPY library with quotes. Then use the standard COPY syntax to replace the quoted substring by another substring. The resulting sequence of characters is re-evaluated by the compiler to make a new string.
 
For example, suppose you have a COPY library called "MYLIB" that contains the following:
and you used this COPY statement:
Then the text of "MYLIB" is effectively treated as:
Format 2
5.

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left