NAME

run - execute BASIC program

SYNOPSIS

#include <basic/string.h>

run(prog)
struct string *prog;

DESCRIPTION

Run executes the file given by the string pointed to by prog.  First, as a precaution, this function uses access(2) to check that prog refers to a file that is executable.  Then all files are flushed and closed.  Finally, the new program is executed using exec(2). 

This function implements a version of the RUN statement. 

SEE ALSO

string(inc)
run(stmt)
access(2), exec(2) in the UNIX Programmer’s Manual

DIAGNOSTICS

Error 51 (Internal error) is generated if exec fails. 

from The Basmark QuickBASIC Programmer’s Manual by Lawrence Leinweber