regarding the example below:
EQU VALID.CC.TYPES TO CHANGE('A.B.D.M.S.V','.',@VM)
The problem with this is that the "CHANGE" within the EQU will get
evaluated at run time, so it will be done repeatedly if placed within
a LOOP or FOR structure.
You would be better off with the earlier suggestion of
EQU VALID.CC.TYPES TO ('A':@VM:'B':@VM:'D':@VM:'M':@VM:'S':@VM:'V')
The concatenation will be done by the compiler, and the parenthesis
will protect the LOCATE field designator, "<1,1>" from being
interpreted as an extraction. This does compile, by the way.
-Rick
On Oct 23, 2007, at 2:04 PM, Rex Gozar wrote:
Allen,
EQU VALID.CC.TYPES TO CHANGE('A.B.D.M.S.V','.',@VM)
does compile and it will protect the value of VALID.CC.TYPES from
being unintentionally changed -- which is the reason for using EQU
to declare constants in the code.
I just wanted to remind people that equating to a variable does not
set an unchanging, constant value; this can be a source of hard-to-
find bugs.
rex
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/