Mercurial > hg > octave-terminal
changeset 469:12c3914275a0
[project @ 1994-06-06 05:26:09 by jwe]
author | jwe |
---|---|
date | Mon, 06 Jun 1994 05:29:01 +0000 |
parents | c35a1ee8d272 |
children | 693d18604ccb |
files | src/builtins.cc src/g-builtins.cc |
diffstat | 2 files changed, 14 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/src/builtins.cc +++ b/src/builtins.cc @@ -305,15 +305,15 @@ { "fclose", 2, 1, builtin_fclose, "fclose (\"filename\" or filenum): close a file", }, - { "feof", 3, 1, builtin_feof, - "eof = feof (filenum)\n\n\ - Returns a non zero eof for an end of file condition for the\n\ - file specified by \"filenum\" from fopen", }, + { "feof", 2, 1, builtin_feof, + "error = feof (\"filename\" or filenum)\n\n\ + Returns a non zero value for an end of file condition for the\n\ + file specified by \"filename\" filenum from fopen", }, - { "ferror", 3, 1, builtin_ferror, - "error = ferror (filenum)\n\n\ - Returns a non zero \"error\" for an error condition on the\n\ - file specified by \"filenum\" from fopen", }, + { "ferror", 2, 1, builtin_ferror, + "error = ferror (\"filename\" or filenum)\n\n\ + Returns a non zero value for an error condition on the\n\ + file specified by \"filename\" or filenum from fopen", }, { "feval", -1, 1, builtin_feval, "feval (\"name\", args, ...): evaluate first argument as function", }, @@ -347,7 +347,7 @@ { "fprintf", -1, 1, builtin_fprintf, "fprintf (\"file\", \"fmt\", ...)", }, - { "fread", 3, 1, builtin_fread, + { "fread", 4, 2, builtin_fread, "[data, count] = fread (filenum, size, \"precision\")\n\n\ Reads data in binary form of type \"precision\" from a file.\n\n\ filenum : file number from fopen\n\ @@ -412,7 +412,7 @@ { "ftell", 2, 1, builtin_ftell, "position = ftell (\"filename\" or filenum): returns the current file position", }, - { "fwrite", 3, 1, builtin_fwrite, + { "fwrite", 4, 1, builtin_fwrite, "count = fwrite (filenum, Data, \"precision\")\n\n\ Writes data to a file in binary form of size \"precision\"\n\n\ filenum : file number from fopen\n\
--- a/src/g-builtins.cc +++ b/src/g-builtins.cc @@ -589,7 +589,7 @@ { tree_constant *retval = NULL_TREE_CONST; - if (nargin < 1) + if (nargin != 2) print_usage ("feof"); else retval = feof_internal (args, nargin, nargout); @@ -605,7 +605,7 @@ { tree_constant *retval = NULL_TREE_CONST; - if (nargin < 1) + if (nargin != 2) print_usage ("ferror"); else retval = ferror_internal (args, nargin, nargout); @@ -760,7 +760,7 @@ { tree_constant *retval = NULL_TREE_CONST; - if (nargin < 2) + if (nargin < 2 || nargin > 4) print_usage ("fread"); else retval = fread_internal (args, nargin, nargout); @@ -922,7 +922,7 @@ { tree_constant *retval = NULL_TREE_CONST; - if (nargin < 3) + if (nargin < 3 || nargin > 4) print_usage ("fwrite"); else retval = fwrite_internal (args, nargin, nargout);