Check if variable is defined

Discussion created by NStrelow on Feb 22, 2016
Latest reply on Feb 24, 2016 by Mark_Hadler_430
Hi @all,

is there a possibility to check if a scriptvariable is defined without generating an error?

For example:

Script A:
:pset &test# = "test"
:set &ret# = activate_uc_object(ScriptC,,,,,PASS_VALUES)

Script B:
:set &ret# = activate_uc_object(ScriptC,,,,,PASS_VALUES)

Script C:
:if &test# = "test"
:p "success"

By starting Script B i get the error, that the variable &test# is not defined yet.

Is there a way to check for this? If the variable is defined or not?

With regards