Open Instruction

Syntax:

Open Name$ For mode [Access access] [lock] As [#]StreamNum [Len = RecordLen]

Group: File

Description:
Open file Name$ for mode as StreamNum.

Parameter Description

Name$ This string value is the path and name of the file. A path relative to the current directory can be used.

mode May be Input, Output, Append, Binary or Random.

access May be Read, Write or Read Write.

lock May be Shared, Lock Read, Lock Write or Lock Read Write.

StreamNum Streams 1 through 255 are private to each macro. Streams 256 through 511 are shared by all macros.

RecordLen This numeric value is the record length for Random mode files. Other file modes ignore this value.

See Also: Close, FileAttr, FreeFile, Reset.

Example:

Sub Main
  Open "XXX" For Output As #1
  Print #1,"1,2,""Hello"""
  Close #1
End
Sub