Check if control variable is defined
Posted: Fri Feb 28, 2025 3:04 am
Is there some way to check if a control variable is previously defined? I've tried the following convoluted way, but the error ('!POSSIBLY_DEFINED_VARIABLE is not defined in "IF !POSSIBLY_DEFINED_VARIABLE THEN" on line 6.') is apparently not impressed by my magic.
Code: Select all
!old_maxerrcount = @maxerrcount
if @maxerrcount = @errorcount then
setmaxerrs {!old_maxerrcount} + 1
endif
!old_errorcount = @errorcount
if !possibly_defined_variable then
endif
if @errorcount > !old_errorcount then
@uiprompt("UNDEFINED")
else
@uiprompt("defined")
endif
seterrcount {!old_errorcount}
setmaxerrs {!old_maxerrcount}