comparison libinterp/corefcn/file-io.cc @ 18207:bea06b5d4423

doc: Improve documentation for fread function. * file-io.cc (Ffread): Redo docstring to include multiple calling forms and to use @var macro around count variable.
author Rik <rik@octave.org>
date Fri, 03 Jan 2014 13:01:18 -0800
parents b560bac0fca2
children 8473198fd005
comparison
equal deleted inserted replaced
18205:8c92b5e7fa4d 18207:bea06b5d4423
1402 return retval; 1402 return retval;
1403 } 1403 }
1404 1404
1405 DEFUN (fread, args, , 1405 DEFUN (fread, args, ,
1406 "-*- texinfo -*-\n\ 1406 "-*- texinfo -*-\n\
1407 @deftypefn {Built-in Function} {[@var{val}, @var{count}] =} fread (@var{fid}, @var{size}, @var{precision}, @var{skip}, @var{arch})\n\ 1407 @deftypefn {Built-in Function} {@var{val} =} fread (@var{fid})\n\
1408 Read binary data of type @var{precision} from the specified file ID\n\ 1408 @deftypefnx {Built-in Function} {@var{val} =} fread (@var{fid}, @var{size})\n\
1409 @var{fid}.\n\ 1409 @deftypefnx {Built-in Function} {@var{val} =} fread (@var{fid}, @var{size}, @var{precision})\n\
1410 @deftypefnx {Built-in Function} {@var{val} =} fread (@var{fid}, @var{size}, @var{precision}, @var{skip})\n\
1411 @deftypefnx {Built-in Function} {@var{val} =} fread (@var{fid}, @var{size}, @var{precision}, @var{skip}, @var{arch})\n\
1412 @deftypefnx {Built-in Function} {[@var{val}, @var{count}] =} fread (@dots{})\n\
1413 Read binary data from the specified file ID @var{fid}.\n\
1410 \n\ 1414 \n\
1411 The optional argument @var{size} specifies the amount of data to read\n\ 1415 The optional argument @var{size} specifies the amount of data to read\n\
1412 and may be one of\n\ 1416 and may be one of\n\
1413 \n\ 1417 \n\
1414 @table @code\n\ 1418 @table @code\n\
1557 \n\ 1561 \n\
1558 @item @qcode{\"ieee-le\"}\n\ 1562 @item @qcode{\"ieee-le\"}\n\
1559 IEEE little endian.\n\ 1563 IEEE little endian.\n\
1560 @end table\n\ 1564 @end table\n\
1561 \n\ 1565 \n\
1562 The data read from the file is returned in @var{val}, and the number of\n\ 1566 The output argument @var{val} contains the data read from the file.\n\
1563 values read is returned in @code{count}\n\ 1567 The optional return value @var{count} contains the number of elements read.\n\
1564 @seealso{fwrite, fgets, fgetl, fscanf, fopen}\n\ 1568 @seealso{fwrite, fgets, fgetl, fscanf, fopen}\n\
1565 @end deftypefn") 1569 @end deftypefn")
1566 { 1570 {
1567 octave_value_list retval; 1571 octave_value_list retval;
1568 1572