VAREXISTS

VarExists can be used to check whether a variable has been defined in the script during the previous
execution steps or not.

Syntax:

VarExists(@variable_name)

Example:

/* 
Check whether the varilable exists
In this example the variable @notfound is not defined, therefore it will show the
message 'Variable not defined' during execution
*/

IF VarExists(@notfound)=FALSE THEN
PRINT 'Variable not defined!'
ELSE
PRINT 'Variable @notfound is defined'
END IF
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.