Radio Shack CTR-118 User Manual Page 42

  • Download
  • Add to my manuals
  • Print
  • Page
    / 196
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 41
3-12
PRINT #-1,
item list
Prints the values of the specified variables onto cassette tape. (Recorder must
be properly connected and set in Record mode when this statement is
executed.) The PRINT # statement must always specify a device number.
This is because the TRS-80 can actually input/output to two cassette
machines, once you've added the Expansion Interface described in Chapter
10. For normal use with just one recorder connected, the device number must
be -1, e.g., PRINT #-1 (followed by a comma and then the item list).
Example:
5 A1=-30.334:B$="STRING-VALUE"
10 PRINT*-1,A1,B$,"THAT'S ALL"
This stores the current values of Al and B$, and also the string-literal
"THAT'S ALL". The values may be input from tape later using the INPUT#
statement. The INPUT# statement must be identical to the PRINT#
statement in terms of
number
and
type of items
in the PRINT#/INPUT#
lists. See INPUT#.
Special Note:
The values represented in item list must not exceed 248 characters total;
otherwise, all characters after the first 248 will be truncated.
For example,
#-1, A#, B#, C#, D#, E#, F#, G#, H#, I#, J#, A$
will probably
exceed the maximum record length if A$ is longer than about 75 characters.
If you have a lengthy list, you should break it up into two or more PRINT#
statements.
INPUT #-1,
item list
Inputs the specified number of values stored on cassette and assigns them to
the specified variable names. Like the PRINT# statement, INPUT# requires
that you specify a device number. (This will make more sense when you have
added the Expansion Interface and are using a dual cassette system. See
Chapter 10.) Use Device number -1 for normal applications without the
Expansion Interface. e.g., INPUT#-1,
list
.
Example:
50 INPUT #-1,X,P$,T$
Page view 41
1 2 ... 37 38 39 40 41 42 43 44 45 46 47 ... 195 196

Comments to this Manuals

No comments