Chapter 7
To verify that Jack now has a copy of your program, he should enter:
VERIFY*“n”;l
while you repeat the sending of the program by entering:
SAVE++“n”;2
SAVE is. in fact. the only statement that sends programs over the net. The
LOAD, VERIFY and MERGE statements are all ways of receiving programs.
The net game in Appendix 1 is a good example of how to use programs with
a network.
Data and the network
Suppose that you now want to send Jack some data. The statement OPEN
#4;“n”;2 opens a channel to station 2 on the net l”n”1, and attaches stream
#4. to it, so that when you output along stream #4. your message will be put
on the net with a note saying that it comes from you.
(Conversely, were you to enter lNPUT# 4;“n”;Z your computer would wait
for information addressed to you from Jack.)
Now enter this program:
10 OPEN #4:“n”;2: REM for output
20 INPUT a$: PRlNT#4;a$
30CLOSEx4
40 OPEN X4;“n”;2: REM for input
50 lNPUTt4;bS: PRINT b$
60 CLOSE X4
70 GO TO 10
Then enter:
SAVE -%“n”;2
31