\"\" \"\" \"\"
Go up to Execution
Go forward to rt_exit(): Program Termination
RISC-Linz logo

rt_main(): Program Start

code = rt_main(f, argc, argv, arg, res)
      int code
      int (*f)(int, char*[])
      int argc
      char *argv[]
      RT_Argument arg
      RT_Result *res

Specification: Executes the RT++ program f(argc, argv) in the environment set up by the argument object arg. The return value of f is returned as code. If res is not 0, some statistics information is returned in the result object referenced by res.

If the RT++ program is terminated by rt_exit(r), code is r. If the RT++ program is aborted by rt_abort(s), code is -1. If during program execution the program anything goes wrong (i.e. the program crashes or runs out of memory), code is -1.

In any case, code is also stored in the res object.

Constraint: All components of the argument structure arg must be positive, except for the verbose flag which must be 0 or 1.


Author: Wolfgang Schreiner
Last Modification: April 12, 1997