{***********************************************************************}
{									}
{ __WaitPgm   Return the value of the exit code 			}
{									}
{ function  __WaitPgm(var ReturnType : byte) : byte;			}
{									}
{	      ReturnType The manner of exit from the invoked child	}
{			 process.  The possible values are:		}
{			 0 - Normal termination 			}
{			 1 - Termination by a Ctrl/Break		}
{			 2 - Termination as a result of a critical	}
{			     error.					}
{			 3 - The process terminated and stayed resident.}
{									}
{ Description This function returns as its functional value the exit	}
{	      code (ErrorLevel) set by the child process. Also returned }
{	      is the manner in which the child process terminated.	}
{									}
{ Version     4.00 (C)Copyright Blaise Computing Inc.  1987		}
{_______________________________________________________________________}

function __WaitPgm(var ReturnType : byte) : byte;

  var
    ReturnInt : integer;

  begin {__WaitPgm}

    ReturnInt  := DosExitCode;
    ReturnType := Hi(ReturnInt);
    __WaitPgm  := Lo(ReturnInt)

  end;	{__WaitPgm}
