
12-33
Creating A Script File
(read)
W
(write) and
C
(create). If this string is omitted the program will
assume that the file will have read and write operations performed on it.
For example, to create the file
myfile.doc
and enable characters to be written to it, the
following line would be entered, specifying that the integer identifying the file is to
be stored in the variable called
id
:
file open id myfile.doc "cw"
The
Error Numbers
section lists the possible error numbers for this command.
FILE READ
Syntax:
FILE READ <handle>
<variable>
<length>
This will read a specified number of characters from a file and assign them to a
variable, where
<handle>
is the integer variable specified by the
file open
command and used to
identify the file.
<variable>
is a previously defined variable (see
var
) which will be used to store
the characters. Note that if the variable was created in the integer for-
mat, the decimal value of the first two characters will be assigned to it.
<length>
is the number of characters to be read if the variable is in string format.
If the variable is in integer format the number of characters that will be
read is two, and if in floating point number format the number of char-
acters that will be read is four.
More than one variable (and length specifier if a string variable) may be specified to
store successive blocks of characters from the file.
The following example will read ten characters from the file identified by the handle
id
and assign them to the string variable
char1
, then read the next six characters and
assign them to the string variable
char2
, and finally read the next 2 characters and
place them in the integer variable
number
:
file read id char1 10 char2 6 number
The
Error Numbers
section lists the possible error numbers for this command.
FILE RENAME
Syntax:
FILE RENAME <filename>
<newname>
This will rename the file specified by
<filename>
to that of
<newname>
. Both
filenames can be specified as strings or string variables.
Содержание -05W
Страница 1: ...TeemTalk 05W 07W 11W User s Guide...
Страница 38: ...2 24 Getting Started Notes...
Страница 58: ...3 20 Keyboard Configuration Notes...
Страница 152: ...8 20 File Transfer Notes...
Страница 162: ...9 10 ICL FTF File Transfer Notes...
Страница 324: ...13 32 Dynamic Data Exchange Text1 i 12 LinkItem 0 i 80 Text1 i 12 LinkMode 1 Next i End If End Sub...
Страница 336: ...C 6 Key Reference Numbers Notes...
Страница 360: ...E 16 Host Command Summary Notes...
Страница 370: ...Index 10 Index X XMODEM 8 1 XMODEM 1K 8 1 Y YMODEM Batch 8 2 Z ZMODEM 8 2 Zoom Button 2 17...