Sure sounds right to me.

The script is interpreted, not compiled. This means that variables will be defined as they are parsed.

The variable which is assigned the value of the SetOption() is fully parsed before the SetOption(). This means that the variable will be automatically declared as a global before the SetOption() is called.

For similar reasons, the following will choke on $Undeclared, $gExplicitState will however be a valid global variable:
code:
$gExplicitState=SetOption("Explicit","ON")
$Undeclared=SetOption("Explicit",$gExplicitState)

And you shouldn't be surprised that the "OFF" in the following works, but the "ON" fails.
code:
$ON="ON"
$OFF="OFF"
$gNull=SetOption("NoVarsInStrings","$OFF")
$gNull=SetOption("NoVarsInStrings","$ON")



[ 23. September 2003, 10:38: Message edited by: Richard H. ]