HALT – PB Docs 2017

HALT

Description

Terminates an application.

Syntax

Usage

When PowerBuilder encounters Halt without the keyword CLOSE, it
immediately terminates the application.

When PowerBuilder encounters Halt with the keyword CLOSE, it
immediately executes the scripts for application Close event and for the
CloseQuery, Close, and Destructor events on all instantiated objects
before terminating the application. If there are no scripts for these
events, PowerBuilder immediately terminates the application.

You should not code a HALT statement in a component that will run in
a server environment. When a PowerBuilder component is running in a J2EE
server, and a HALT statement is encountered, instead of aborting the
application, which is in this case the server itself, the PowerBuilder VM
throws a runtime error and continues. The container is responsible for
managing the lifecycle of the component.

Examples

Example 1

This statement stops the application if the user enters a password
in the SingleLineEdit named sle_password that does not match the value
stored in a string named CorrectPassword:

Example 2

This statement executes the script for the Close event for the
application before it terminates the application if the user enters a
password in sle_password that does not match the value stored in the
string CorrectPassword:


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x