www.delorie.com/gnu/docs/octave/octave_105.html   search  
Buy GNU books!

GNU Octave

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

13.2 C-Style I/O Functions

Octave's C-style input and output functions provide most of the functionality of the C programming language's standard I/O library. The argument lists for some of the input functions are slightly different, however, because Octave has no way of passing arguments by reference.

In the following, file refers to a file name and fid refers to an integer file number, as returned by fopen.

There are three files that are always available. Although these files can be accessed using their corresponding numeric file ids, you should always use the symbolic names given in the table below, since it will make your programs easier to understand.

Built-in Variable: stdin
The standard input stream (file id 0). When Octave is used interactively, this is filtered through the command line editing functions.

Built-in Variable: stdout
The standard output stream (file id 1). Data written to the standard output is normally filtered through the pager.

Built-in Variable: stderr
The standard error stream (file id 2). Even if paging is turned on, the standard error is not sent to the pager. It is useful for error messages and prompts.

13.2.1 Opening and Closing Files  
13.2.2 Simple Output  
13.2.3 Line-Oriented Input  
13.2.4 Formatted Output  
13.2.5 Output Conversion for Matrices  
13.2.6 Output Conversion Syntax  
13.2.7 Table of Output Conversions  
13.2.8 Integer Conversions  
13.2.9 Floating-Point Conversions  Other Output Conversions::
13.2.10 Other Output Conversions  
13.2.11 Formatted Input  
13.2.12 Input Conversion Syntax  
13.2.13 Table of Input Conversions  
13.2.14 Numeric Input Conversions  
13.2.15 String Input Conversions  
13.2.16 Binary I/O  
13.2.17 Temporary Files  
13.2.18 End of File and Errors  
13.2.19 File Positioning  

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003