Variables and constants declared (using the
Conststatements) within a CitectVBA procedure
(subroutine or function) have local scope to only that within the
procedure. This means that procedural level variables and constants
cannot be referenced (accessed and used) from anywhere outside of
UNINTENDED EQUIPMENT OPERATION
Do not use the Global, Public, or Private keywords in your CitectVBA procedures. Using these keywords in procedures can lead to unintended equipment operation when your program is run.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
Procedural level variables declared using the
Dimstatement do not retain their
assigned values when dereferenced. Procedural level variables
declared using the
however, do retain their assigned values between references, even
after that procedure moves out of scope.