Hitachi

JP1 Version 11 JP1/Script Description and Reference (For Windows Systems)


8.13.4 Exit (terminate script execution)

Purpose

Terminates script execution.

Syntax
Exit ([Code] [, Option])
Arguments
Code

Specify the exit code as a number or as a variable that stores this value.

If you omit this value, 0 is assumed.

Option

Specify either of the following values:

Value

Meaning

Skip

Terminate the script without waiting for completion of executable files called by the Exec command or NetExec command.

Abort or Stop

When the script ends, forcibly terminate all executable files called by the Exec command or NetExec command.

This value is optional. If you omit this value, the script waits for completion of all executable files called by the Exec command or NetExec command.

Description

The Exit command terminates script execution. For details about JP1/Script exit codes, see 6.1.12 JP1/Script exit codes.

Important note
  • The Exit command executed in a script called by the CallSpt command simply terminates execution of that script and returns control to the calling script. Execution of the calling script is not terminated.

  • The Skip specification in the Option argument of the Exit command is valid if you terminate the script without waiting for completion of an executable file called by the Exec or NetExec command. In this case, to terminate the script from a script file called by the CallSpt command, specify Skip in the Option argument of the Exit command for a script file that executes the CallSpt command. The script will not terminate if you specify Skip in the Option argument of the Exit command for a script file that executes the Exec or NetExec command. For details, see Example 4 in 8.10.5 CallSpt (call a script file with multiple parameters set).

Example
MessageBox ("Script execution will be terminated.", OK)
Exit (0)
JP1/Script version

Supported from JP1/Script 01-00.