OpenSTA logo OpenSTA SCL Reference
EXIT Command

EXIT Command

This command causes execution of the current Script to terminate immediately, no further Script commands will be executed.

An optional status value can be returned when the Script in question has been called from another Script. This is achieved by using the status variable to place a value into the return status variable specified on the call to this Script. If no status is specified, but the caller is expecting one, then the status returned will be that returned by the last Script which exited with a status. This allows a status to be retrieved from a deeply nested Script where no explicit status returning has been employed. This feature is broken - see bug#573365 for updates.

At run-time, a Script is automatically terminated when the end of the Script is reached. It is not necessary to include an EXIT command as the last command in a Script, to terminate Script execution.

If the Script has been called, using the CALL SCRIPT command, execution of the calling Script will resume at the command immediately following the CALL SCRIPT command.

When an EXIT command is processed and there are no other threads executing the Script, the Script data is discarded. However, if the ,KEEPALIVE option is specified on the EXIT command, then the Script data that will not be deleted even if there are no other threads executing it. This allows subsequent threads to execute the Script and access any Script data set up by a previous thread.

Command Definition:

EXIT {status} {,KEEPALIVE}

status

An integer variable or value to be returned as the status from this Script to the caller. The status will be returned into the integer variable specified on the CALL SCRIPT commands RETURNING clause. This feature is broken - see bug# 573365 for updates.

Example:

EXIT Return-Status, KEEPALIVE

Related:


<<<
prev page
^^^
section start
>>>
next page