LisaacTM Platform

STD_INPUT_OUTPUT


To have the useful `io'
Inherit/Insert Summary
inherit_input_stream
inherit_output_stream
parent_object No developed.
 
Slot Summary
is_connected
True when the corresponding stream is connected to some physical input device.
make
read_character
Read a character and assign it to last_character.
unread_character
Un-read the last character read.
push_back_flag
True if one char is already pushed back.
last_character
Last character read with read_character.
put_character
end_of_input
Has end-of-input been reached ? True when the last character has been read.
read_line_in
Same jobs as read_line but storage is directly done in buffer.
last_integer
Last integer read using read_integer.
last_string
Access to the unique common buffer to get for example the result computed by read_line, read_word, newline, etc. This is a once function (the same common buffer is used for all streams).
last_real
Last real read with read_real.
last_double
Last double read with read_double.
put_string
Output s to current output device.
put_integer
Output i to current output device.
put_integer_format
Output i to current output device using at most s character.
 
Skipping separators:
skip_separators
Skip all separators (see is_separator of class CHARACTER) and make the first non-separator available in last_character. This non-separator character is pushed back into the stream (see unread_character) to be available one more time (the next read_character will consider this non-separator). When end_of_input occurs, this process is automatically stopped.
skip_separators_using
Same job as skip_separators using the separators set.
skip_remainder_of_line
Skip all the remainder of the line including the end of line character itself.
 
To read one number at a time:
read_integer
Read an integer according to the Lisaac syntax. Make result available in last_integer. Heading separators are automatically skipped using is_separator of class CHARACTER. Trailing separators are not skipped.
read_real
Read a REAL and make the result available in last_real and in last_double. The integral part is available in last_integer.
read_double
Read a DOUBLE and make the result available in last_double.
 
To read one line or one word at a time:
read_line
Read a complete line ended by '\n' or end_of_input. Make the result available in last_string common buffer. The end of line character (usually '\n') is not added in the last_string buffer.
read_word
Read a word using is_separator of class CHARACTER. Result is available in the last_string common buffer. Heading separators are automatically skipped. Trailing separators are not skipped (last_character is left on the first one). If end_of_input is encountered, Result can be the empty string.
newline
Consume input until newline ('\n') is found. Corresponding STRING is stored in last_string common buffer.
reach_and_skip
Try to skip enough characters in order to reach the keyword which is skipped too. If the keyword is not in the remainder of this stream, the process is stopped as soon as end_of_input occurs. As for skip_separators the following character of the keyword is available in last_character and not yet read.
 
Other features:
read_word_using
Same jobs as read_word using separators.
read_tail_in
Read all remaining character of the file in str.
 
Other features:
put_boolean
Output b to current output device according to the Eiffel format.
put_pointer
Output a viewable version of p.
put_new_line
Output a newline character.
put_spaces
Output nb spaces character.
file_exists
flush
forces a write of unwritten character (write my have been delayed, flush writes buffered characters)
 

Inherit/Insert Detail

inherit_input_stream

.../base/io/low_level/std_input_output.li line #12

Section:
Inherit

Profile:
- SelfSELFinherit_input_stream : INPUT_STREAM

inherit_output_stream

.../base/io/low_level/std_input_output.li line #14

Section:
Inherit

Profile:
- SelfSELFinherit_output_stream : OUTPUT_STREAM

parent_object

.../base/io/low_level/input_stream.li line #13

Section:
Inherit

Profile:
- SelfSELFparent_object : OBJECT

Detail slot

is_connected

.../base/io/low_level/std_input_output.li line #18

Section:
Public

Profile:
- SelfSELFis_connected : BOOLEAN

Description:
True when the corresponding stream is connected to some physical input device.

make

.../base/io/low_level/std_input_output.li line #20

Section:
Public

Profile:
- SelfSELFmake 

read_character

.../base/io/low_level/std_input_output.li line #24

Section:
Public

Profile:
- SelfSELFread_character 

Description:
Read a character and assign it to last_character.

unread_character

.../base/io/low_level/std_input_output.li line #29

Section:
Public

Profile:
- SelfSELFunread_character 

Description:
Un-read the last character read.

push_back_flag

.../base/io/low_level/std_input_output.li line #34

Section:
Public

Profile:
- SelfSELFpush_back_flag : BOOLEAN

Description:
True if one char is already pushed back.

last_character

.../base/io/low_level/std_input_output.li line #39

Section:
Public

Profile:
- SelfSELFlast_character : CHARACTER

Description:
Last character read with read_character.

put_character

.../base/io/low_level/std_input_output.li line #44

Section:
Public

Profile:
- SelfSELFput_character   c : CHARACTER

end_of_input

.../base/io/low_level/std_input_output.li line #49

Section:
Public

Profile:
- SelfSELFend_of_input : BOOLEAN

Description:
Has end-of-input been reached ? True when the last character has been read.

read_line_in

.../base/io/low_level/std_input_output.li line #54

Section:
Public

Profile:
- SelfSELFread_line_in   buffer : STRING

Description:
Same jobs as read_line but storage is directly done in buffer.

last_integer

.../base/io/low_level/input_stream.li line #20

Section:
Public

Profile:
- SelfSELFlast_integer : INTEGER

Description:
Last integer read using read_integer.

last_string

.../base/io/low_level/input_stream.li line #23

Section:
Public

Profile:
- SelfSELFlast_string : STRING

Description:
Access to the unique common buffer to get for example the result computed by read_line, read_word, newline, etc. This is a once function (the same common buffer is used for all streams).

last_real

.../base/io/low_level/input_stream.li line #209

Section:
Public

Profile:
- SelfSELFlast_real : REAL

Description:
Last real read with read_real.

last_double

.../base/io/low_level/input_stream.li line #300

Section:
Public

Profile:
- SelfSELFlast_double : DOUBLE

Description:
Last double read with read_double.

put_string

.../base/io/low_level/output_stream.li line #23

Section:
Public

Profile:
- SelfSELFput_string   s : ABSTRACT_STRING

Description:
Output s to current output device.

put_integer

.../base/io/low_level/output_stream.li line #33

Section:
Public

Profile:
- SelfSELFput_integer   i : INTEGER

Description:
Output i to current output device.

put_integer_format

.../base/io/low_level/output_stream.li line #42

Section:
Public

Profile:
- SelfSELFput_integer_format  ( i : INTEGER, s : INTEGER)

Description:
Output i to current output device using at most s character.

Skipping separators:

skip_separators

.../base/io/low_level/input_stream.li line #77

Section:
Public

Profile:
- SelfSELFskip_separators 

Description:
Skip all separators (see is_separator of class CHARACTER) and make the first non-separator available in last_character. This non-separator character is pushed back into the stream (see unread_character) to be available one more time (the next read_character will consider this non-separator). When end_of_input occurs, this process is automatically stopped.

skip_separators_using

.../base/io/low_level/input_stream.li line #93

Section:
Public

Profile:
- SelfSELFskip_separators_using   separators : STRING

Description:
Same job as skip_separators using the separators set.

skip_remainder_of_line

.../base/io/low_level/input_stream.li line #106

Section:
Public

Profile:
- SelfSELFskip_remainder_of_line 

Description:
Skip all the remainder of the line including the end of line character itself.

To read one number at a time:

read_integer

.../base/io/low_level/input_stream.li line #128

Section:
Public

Profile:
- SelfSELFread_integer 

Description:
Read an integer according to the Lisaac syntax. Make result available in last_integer. Heading separators are automatically skipped using is_separator of class CHARACTER. Trailing separators are not skipped.

read_real

.../base/io/low_level/input_stream.li line #199

Section:
Public

Profile:
- SelfSELFread_real 

Description:
Read a REAL and make the result available in last_real and in last_double. The integral part is available in last_integer.

read_double

.../base/io/low_level/input_stream.li line #212

Section:
Public

Profile:
- SelfSELFread_double 

Description:
Read a DOUBLE and make the result available in last_double.

To read one line or one word at a time:

read_line

.../base/io/low_level/input_stream.li line #305

Section:
Public

Profile:
- SelfSELFread_line 

Description:
Read a complete line ended by '\n' or end_of_input. Make the result available in last_string common buffer. The end of line character (usually '\n') is not added in the last_string buffer.

read_word

.../base/io/low_level/input_stream.li line #316

Section:
Public

Profile:
- SelfSELFread_word 

Description:
Read a word using is_separator of class CHARACTER. Result is available in the last_string common buffer. Heading separators are automatically skipped. Trailing separators are not skipped (last_character is left on the first one). If end_of_input is encountered, Result can be the empty string.

newline

.../base/io/low_level/input_stream.li line #337

Section:
Public

Profile:
- SelfSELFnewline 

Description:
Consume input until newline ('\n') is found. Corresponding STRING is stored in last_string common buffer.

reach_and_skip

.../base/io/low_level/input_stream.li line #356

Section:
Public

Profile:
- SelfSELFreach_and_skip   keyword : STRING

Description:
Try to skip enough characters in order to reach the keyword which is skipped too. If the keyword is not in the remainder of this stream, the process is stopped as soon as end_of_input occurs. As for skip_separators the following character of the keyword is available in last_character and not yet read.

Other features:

read_word_using

.../base/io/low_level/input_stream.li line #421

Section:
Public

Profile:
- SelfSELFread_word_using   separators : STRING

Description:
Same jobs as read_word using separators.

read_tail_in

.../base/io/low_level/input_stream.li line #438

Section:
Public

Profile:
- SelfSELFread_tail_in   str : STRING

Description:
Read all remaining character of the file in str.

Other features:

put_boolean

.../base/io/low_level/output_stream.li line #56

Section:
Public

Profile:
- SelfSELFput_boolean   b : BOOLEAN

Description:
Output b to current output device according to the Eiffel format.

put_pointer

.../base/io/low_level/output_stream.li line #64

Section:
Public

Profile:
- SelfSELFput_pointer   p : POINTER

Description:
Output a viewable version of p.

put_new_line

.../base/io/low_level/output_stream.li line #73

Section:
Public

Profile:
- SelfSELFput_new_line 

Description:
Output a newline character.

put_spaces

.../base/io/low_level/output_stream.li line #80

Section:
Public

Profile:
- SelfSELFput_spaces   nb : INTEGER

Description:
Output nb spaces character.

file_exists

.../base/io/low_level/output_stream.li line #89

Section:
Public

Profile:
- SelfSELFfile_exists   path : ABSTRACT_STRINGBOOLEAN

flush

.../base/io/low_level/output_stream.li line #113

Section:
Public

Profile:
- SelfSELFflush 

Description:
forces a write of unwritten character (write my have been delayed, flush writes buffered characters)