DEFINITION Execute;  (* Stephan Junker  20.11.93 *)

(* Module Execute should be used by modules which run under the loader
 * as well as in stand alone program and it calls code which is available
 * as object module or stand alone program. Just call Exec with the name
 * of the program, and it determines whether to start a module or a program.
 * If you are shure to call a program, use GEMDOS.Pexec. If you are shure
 * to call a module, use Oberon.CallModule.
 *)


PROCEDURE Exec*( name, command : ARRAY OF CHAR) : BOOLEAN;
  (* If the module is running under the loader, Exec tries to call the
     object module with the given name. You can assign a full path name,
     because the file name is extracted for module start. If the module
     is running without the loader, GEMDOS.Pexec is used to call the
     program. command is the commandline parameter for the program. The
     environment passed on is the same as defined by Sys.Basepage.Env.
     Exec returns false if the execution failed and displays an error
     message. *)


END Execute.