Petr Schreiber
05-09-2005, 17:26
Hi,
I know that thinBASIC help file is still under development, but I'v found, that it contain some information, which is not true now.
In chapter named "Variables" there is red colored text which says:
You can also declare a variable implicitly by simply using its name in your script. That's not generally a good practice because you could misspell the variable name in one or more places, causing unexpected results when your script is run. For that reason, the Option Explicit statement is available to require explicit declaration of all variables. The Option Explicit statement should be the first statement in your script.
Interpeter in current version is so smart, that it detects use of undeclared variable, and it NOT allows to use it.
Options Explicit is also not needed ( and not existent ) statement of thinBASIC language
Thanks,
Psch
I know that thinBASIC help file is still under development, but I'v found, that it contain some information, which is not true now.
In chapter named "Variables" there is red colored text which says:
You can also declare a variable implicitly by simply using its name in your script. That's not generally a good practice because you could misspell the variable name in one or more places, causing unexpected results when your script is run. For that reason, the Option Explicit statement is available to require explicit declaration of all variables. The Option Explicit statement should be the first statement in your script.
Interpeter in current version is so smart, that it detects use of undeclared variable, and it NOT allows to use it.
Options Explicit is also not needed ( and not existent ) statement of thinBASIC language
Thanks,
Psch