AT&T 6300 Programmer's Manual page 426

Gwbasic by microsoft
Hide thumbs Also See for 6300:
Table of Contents

Advertisement

PUT (Files)
Statement
Example
7-270
10 OPEN uR"J1,uA:RAND"J48
20 FIELD 1 J 20 AS R1S J 20 AS R2S J 8 AS R3S
30 FOR L=1 TO 2
40 INPUT uname";NS
50 INPUT uaddress";MS
60 INPUT uphone";P#
70 LSET R1S = NS
80 LSET R2S = MS
90 LSET R3S=MKSS(P#)
100 PUT #1 J L
110 NEXT L
120 CLOSE #1
130 END
RUN
name? Super man
address? usa
phone? 11234621
name? robin hood
address? England
phone? 23462101
Ok
Statement 10 opens the random file RAND,
with a record length of 48 on the diskette drive
in A. The file number is
1.
Statement 20
divides the buffer into fields.
Statement 100 writes a record to file RAND,
with the record number being set by the
control variable of the FOR/NEXT loop.

Advertisement

Table of Contents
loading

Table of Contents