fopen
Open a file in Nelson.
Syntax
fid = fopen(filename)
fid = fopen(filename, permission)
[fid, msg] = fopen(filename)
[fid, msg] = fopen(filename, permission)
[fid, msg] = fopen(filename, permission, machinefmt, encoding)
[filename, permission, machinefmt, encoding] = fopen(fid)
fids = fopen('all')
Input argument
filename - a string: filename to open
permission - a string: permission applied on file: 'r', 'w', 'a', 'r+', 'a+'
machinefmt - a string: machine format applied on file: 'n' or 'native', 'b' or 'ieee-be', 'l' or 'ieee-le', 's' or 'ieee-be.l64', 'a' or 'ieee-le.l64'
encoding - a string: ccharacter encoding applied on file: 'UTF-8', 'ISO-8859-1', 'windows-1251', 'windows-1252', ...
Output argument
fid - an integer value: a file descriptor or -1 if there is an error.
msg - a string: error message returned by fopen or ''.
fids - a vector of integer values: list of files descriptor opened in Nelson.
Description
fopen opens a file in Nelson.
functions fprintf, fgetl, fgets, fread, and fwrite use character encoding for subsequent read and write operations.
Examples
characters encoding
See also
History
1.0.0
initial version
Author
Allan CORNET
Last updated