Used to specify various Xbasic options.
OPTION is used to specify various Xbasic options. You can use this command to: Specify whether variables in a script must be declared before being used. For this purpose, Type can be STRICT or RELAX. Specify weather a script that is taking a long time to complete can be halted. When Alpha Anywhere determines that a script is taking a long time to complete, it will cause a "Halt Script" icon to display on the task bar. You can click this icon to display a dialog that will allow you to halt the current script.
This is useful if a programming error has resulted in an infinite loop. You can terminate the script without having to terminate your Alpha Anywhere session. For this purpose, Type can be BREAK or NOBREAK. Note : A setting in the Settings dialog (accessed by selecting View > Settings from the menu) controls whether the Halt Script dialog is enabled. To enable the Halt Script dialog: Navigate to the "Preferences" section in the "Settings" dialog. Select the "Running Scripts" category. Select "Yes" for the "Enable 'Halt Script' dialog" prompt. Alternatively, you can use the following Xbasic command to enable the "Halt Script" dialog: A5.SYSTEM_MODE_SET("enable_break", "true"). If the command OPTION STRICT is used, variables must be declared using dim prior to being used. Using this command in a script can help guard against programming errors that result from typing a variable name incorrectly. If the command OPTION RELAX is used, variables will be automatically declared when used.
OPTION STRICT 'this will generate an error because count has not been declared count = 0 OPTION RELAX 'this will not generate an error. Count has not been declared. 'However, it is implicitly declared by assigning a value to it. count = 0 OPTION STRICT dim count a N count = 0 'this is OK because count was declared. OPTION NOBREAK 'Alpha Anywhere will no longer display the Break icon on the 'Task bar if a script has been executing for a long time.