Test whether a named variable exists.
bool isdef <string:VarName>
Name | Type | Comment |
---|---|---|
VarName | string | The name of a variable, the existence of which is to be tested. |
True if the variable named by VarName exists, and false otherwise.
// create a variable called "i" and then test whether it exists using isdef and echo int i if <zs:isdef "i"> echo "true" else echo "false" endif
… the output of which is written to the event log by echo as:
true
None.