User guide

eWON 500-2001-4001-4002 User Guide - Programming the eWON
eWON 500®2001®4001®4002® Version 4_3_0 - User Guide - 10/5/05 - ©ACT'L sa - Page 157
9.2.57.3.4 EXP export bloc descriptor open Syntax [command]
OPEN S1 FOR TEXT|BINARY INPUT AS E1
Note:
This command works only with INPUT
S1 will be as follows: "exp:XXXXX", where XXXXX is an Export Block Descriptor.
E1 is the file number. After the OPEN operation, the file is referenced by its file number and not by its file name.
There are 8 file numbers available. Once a file number is assigned to a file it is allocated to that file until the CLOSE command is issued.
When the export block has been read (or not if you close before end) you must call CLOSE to release memory.
Warning: You cannot use the PUT command with a EXP: file
Example 1:
In that case the "a$ = get 1" can be called until it returns an empty string to read the content of the Export Block Descriptor; the data are then read
by blocks of maximum 2048 bytes. If you want to reduce or increase that size, you can call "a$ = get 1,y", where y is the maximum number of
bytes you want the function to return (do not put y=0).
Example 2:
See also:
“CLOSE” on page 133, “EOF” on page 137, “GET” on page 138, “PUT” on page 160
OPEN "exp:$dtAR $ftT" FOR TEXT INPUT AS 1
Loop:
A$ = Get 1
PRINT A$
If A$ <>"" then GOTO Loop
CLOSE 1
OPEN "exp:$dtUF $ftT $fn/myfile.txt" FOR TEXT INPUT AS
1
A$ = Get 1
PRINT A$
CLOSE 1