Skip to content

REPLACE

REPLACE

Obsolete

This command is replaced by the Define command.

See Also

Purpose

To replace in compilation all occurrences of one token source code with another.

Syntax

#REPLACE {existing} {replacement}

What It Does

#REPLACE causes the compiler to replace any subsequent occurrence of a symbolic token with some other symbol. Example:

#REPLACE C_iMaxLines 100

In the above example, any subsequent occurrence of the token C_iMaxLines will be replaced with the number 100 by the compiler.

Other examples of #REPLACE follow:

#REPLACE S_nGrossPay  (nHours * nRate)
#REPLACE S_nNetPay    (nGrossPaynDeductions)

Notes

  • #REPLACE must be spelled in capital letters.
  • #REPLACE does not affect portions of source code above the line on which it is placed. It only affects source code following it.
  • The Define command is better suited for declaring program constants.