fopen

This macro opens a file for reading, writing, or both.

Syntax:

int fopen (file_id, file_name, mode)

where:

file_id

An integer that you want to be assigned to the file when it is opened.

file_name

The name of the file you want to open.

Filenames must be in double quotes, for example "myfiles/file".

Filenames containing a backslash must be in double quotes, with each backslash escaped. For example, “c:\\myfiles\\file”.

mode

Standard C-style file mode.

Return Value

int

One of the following

 -1          Failure

fileid   Success, the ID number of the opened file is returned.

 

Rules

None