|
Use HALT without associated keywords to terminate (halt) the application immediately. Use HALT with the keyword CLOSE to close the application before terminating the application.
Syntax
When PowerBuilder encounters Halt in a script without the keyword CLOSE, it immediately terminates the application.
When PowerBuilder encounters Halt in a script with the keyword CLOSE, it immediately executes the script for the Close event for the application and then terminates the application. If there is no script for the Close event at the application level, PowerBuilder immediately terminates the application.
Examples:
The following statement terminates the application if the user enters a password in the sle_password that does not match the value stored in the string CorrectPassword:
if sle_password <> CorrectPassword then halt
The following statement executes the script for the close event for the application before it terminates the application if the user enters a password in the sle_password that does not match the value stored in the string CorrectPassword:
if sle_password <> CorrectPassword then halt close
|