fopen
Opens a file with the given mode
Syntax
y = fopen ( filename,mode )
Inputs
| Argument | Type | Description | Unit |
|---|---|---|---|
filename | text | Name of the file to open | n/a |
mode | text | File open mode, such as "r" "w" "a" "rb" "rt" "wb" "wt" | - |
Outputs / Return Value
y:yis SCAL indicating the file identifier.yis -1 if there's an error.
Notes
- Internally, the C fopen function is called with the given arguments.
- Make sure to open the file as binary (use "wb") when opening a binary file (one of most frequent mistakes!)