rem genmucha.bas

rem Generate a blassic program that creates a bunch of vars
rem and a little code to check goto use.

n= 10000

nline= 10
incline= 10

OPEN "muchavar.bas" FOR OUTPUT AS #1

print #1, "2 goto var_end"
print #1, "4 label var_begin"

FOR i= 1 TO n
	print chr$(13); nline;
	PRINT #1, STR$(nline) + " a" + STR$ (i) + "= " + STR$ (i)
	nline= nline + incline
NEXT

print chr$(13); nline;
print #1, str$ (nline) + " goto program_end"
nline= nline + incline

print chr$(13); nline;
print #1, str$ (nline) + " label var_end"
nline= nline + incline

print chr$(13); nline;
print #1, str$ (nline) + " goto var_begin"
nline= nline + incline

print chr$(13); nline;
print #1, str$ (nline) + " label program_end"
nline= nline + incline

print chr$(13); nline;
print #1, str$ (nline) + " end"
nline= nline + incline

print

close #1

end
