5.14 Class STD_FILES PreviousNext

indexing
description: "Commonly used input and output mechanisms. %
    %This class may be used as either ancestor or supplier by %
    %classes needing its facilities."
class interface
STD_FILES
feature -- Access
default_output: FILE
        -- Default output.
error: FILE
        -- Standard error file
input: FILE
        -- Standard input file
output: FILE
        -- Standard output file
standard_default: FILE
        -- Return the default_output or output
        -- if default_output is Void.
feature -- Status report
last_character: CHARACTER
        -- Last character read by read_character
last_double: DOUBLE
        -- Last double read by read_double
last_integer: INTEGER
        -- Last integer read by read_integer
last_real: REAL
        -- Last real read by read_real
last_string: STRING
        -- Last string read by read_line, 
        -- read_stream, or read_word
feature -- Element change
put_boolean (b: BOOLEAN)
        -- Write b at end of default output.
put_character (c: CHARACTER)
        -- Write c at end of default output.
put_double (d: DOUBLE)
        -- Write d at end of default output.
put_integer (i: INTEGER)
        -- Write i at end of default output.
put_new_line
        -- Write line feed at end of default output.
put_real (r: REAL)
        -- Write r at end of default output.
put_string (s: STRING)
        -- Write s at end of default output.
    require
        s /= Void
set_error_default
        -- Use standard error as default output.
set_output_default
        -- Use standard output as default output.
feature -- Input
read_character
        -- Read a new character from standard input.
        -- Make result available in last_character.
read_double
        -- Read a new double from standard input.
        -- Make result available in last_double.
read_integer
        -- Read a new integer from standard input.
        -- Make result available in last_integer.
read_line
        -- Read a line from standard input.
        -- Make result available in last_string.
        -- New line will be consumed but not part of last_string.
read_real
        -- Read a new real from standard input.
        -- Make result available in last_real.
read_stream (nb_char: INTEGER)
        -- Read a string of at most nb_char bound characters
        -- from standard input.
        -- Make result available in last_string.
to_next_line
        -- Move to next input line on standard input.
end

Copyright © 1995, Nonprofit International Consortium for Eiffel
mailto:
nice@atlanta.twr.com
Last Updated: 26 October 1997

HomeTocPreviousNext