Revised HALT Statement
\The Sandbox \PB History & Future \New in PB 2 \PowerScript \Revised HALT Statement
Data Types
Dynamic SQL
Dynamic SQL
Functions
Embedded SQL
Blob Support
New & Modified
Functions
International
Support
Microsecond
Support
Revised HALT
Statement
Reserved Words

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

    HALT {CLOSE}

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

PBL Peeper PB Help PB History
& Future About Us Feedback Site Map

Google
 
Web www.techno-kitten.com
www.sybase.com