NAME

run - run a program

SYNOPSIS

run [LineNum]
run FileSpec

DESCRIPTION

Run LineNum is equivalent to goto LineNum (see goto).  Run without a line number is equivalent to a transfer of control to the beginning of the program. 

Run FileSpec executes the program residing in the specified file.  All files are closed prior to execution of the program.  FileSpec may be any string expression. 

EXAMPLE

The program
	data 21, lunar, robots
	print "Welcome to the Arcade"
	for i = 1 to 3
		read a$(i)
		print using "#) &"; i, a$(i)
	next i
	input "Which would you like to play"; i
	run a$(i)
	print "Games are for children, you pinhead!"
presents the user with a menu of games and then runs the user’s choice using the run statement.  Note that control is completely relinquished by this program so that the final statement will never be executed. 

SEE ALSO

chain

DIAGNOSTICS

If anything goes wrong in the setup or execution of the program, an "Internal error" occurs. 

USAGE NOTES

The UNIX environment poses some problems regarding data shared among modules.  In particular it is not possible to manipulate data in another module not declared in the current module.  For this reason and because in UNIX one can not willy-nilly clear the data segment, the memory clearing behavior of run and run LineNum is no longer considered to be implementable in a reasonable form. 

from The Basmark QuickBASIC Programmer’s Manual by Lawrence Leinweber