Page 1 of 1 1
Topic Options
#47937 - 1999-07-06 09:41 AM How to use the OPEN() command
Anonymous
Unregistered


Can someone please explain the usage of the OPEN() command? I cannot find it in the manual, but have seen it in various scripts.
Thanks

Top
#47938 - 1999-07-07 07:27 AM Re: How to use the OPEN() command
Anonymous
Unregistered


It is not a command but a function and there is a section in the manual for it.

This was copied from page 61.

OPEN
Action
Opens a text file.

Syntax
OPEN (file number, "file name", mode)

Parameters
File number
A numeric expression indicating the file number of the file to open. Possible values range from 1 to 10.
File name
A string expression indicating the path and name of the ASCII file to open.
Mode
Optional parameter that indicates what should happen if the file does not exist. This parameter can have the following values:

0 If the file does not exist, OPEN fails with return code 2 (default).
1 If the file does not exist, OPEN will create a new file.
2 Opens the file for read access (default).
4 Opens the file for write access.


Note
These values are cumulative. So if you want to open a file for write access, and create it if it does not yet exist, you should specify 5. Notice however that a file can not be opened for read and write access at the same time.

Good Luck
Rene

------------------

Top
#47939 - 1999-07-07 01:37 PM Re: How to use the OPEN() command
Anonymous
Unregistered


Rene,

Thanks ...

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2312 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.051 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org