CheckVar (macro)

Checks to see if the variable varname exists. If it does exist, Checkvar does nothing. If it does not exist, Checkvar creates the variable varname and assigns it the value value.


Def CheckVar {if (exist(%1) != 4) %1=%2;};


This script checks to see if the variable flag exists. If flag exists, it does nothing. If it doesn't exist, it creates flag and assigns it a value of 1.

CheckVar flag 1;