ProgramExitCode()

Syntax

Result = ProgramExitCode(Program)
Description
Returns the exitcode that was returned when the given program ended.

Parameters

Program The program to use. It must have been started before with RunProgram().

Return value

The exitcode that was returned when the specified program ended.

Remarks

This function should only be used after the given program has ended. Use ProgramRunning() or WaitProgram() to make sure of that.

The exitcode allows for a single value to be returned from the program, back to the program that executed it. This is usually used to indicate either the error or the success of the program. Please note, that due to OS limitation on OS X and Linux the supported exitcode are in the range of 0 - 255.

To return an exitcode from a PB program, use the optional value with the End statement:
  End 1   ; returns the exitcode 1

Supported OS

All

<- NextEnvironmentVariable() - Process Index - ProgramFilename() ->