17.07.2013 Views

GWBASIC User's Manual

GWBASIC User's Manual

GWBASIC User's Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

GW-BASIC <strong>User's</strong> Guide<br />

40 ENVTBL$ (NPARMS) = ENVIRON$(NPARMS)<br />

50 NPARMS = NPARMS + 1<br />

60 WEND<br />

70 NPARMS = NPARMS-1<br />

72 WHILE LEN(ENVIRON$(1))>0<br />

73 A$=MID$(ENVIRON$(1), 1, INSTR (ENVIRON$(1), "="))<br />

74 ENVIRON A$+";"<br />

75 WEND<br />

90 ENVIRON "MYCHILDPARM1=SORT BY NAME"<br />

100 ENVIRON "MYCHILDPARM2=LIST BY NAME"<br />

.<br />

.<br />

.<br />

1000 SHELL "MYCHILD"'RUNS "MYCHILD.EXE"<br />

1002 WHILE LEN(ENVIRON$(1))>0<br />

1003 A$=MID$(ENVIRON$(1), 1, INSTR(ENVIRON$ (1), "="))<br />

1004 ENVIRON A$+";"<br />

1005 WEND<br />

1010 FOR I=1 TO NPARMS<br />

1020 ENVIRON ENVTBL$(I)<br />

1030 NEXT I<br />

.<br />

.<br />

.<br />

The DIM statement in line 10 assumes no more than 10 parameters will be accessed.<br />

In line 20, the initial number of parameters is established as 1.<br />

In lines 30 through 70, a series of statements are used to adjust and correct the parameter<br />

numbers.<br />

Line 71 deletes the present environment.<br />

Lines 72 through 80 create a new environment. Line 74 deletes the string.<br />

Lines 80 through 100 store the new environment.<br />

Lines 1000 through 1030 repeat the procedure by deleting the present environment and restore<br />

the parameters established in the first part of the program.<br />

file:///C|/Documents%20and%20Settings/Lorenzo/Desktop/GW%20Basic/ENVIRONS.html (2 of 2)28/03/2004 21.29.24

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!