PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/tutorial/io/read_character.e

http://github.com/tybor/Liberty
Specman e | 27 lines | 20 code | 4 blank | 3 comment | 0 complexity | d77570f0d9239e7ad4bce453e04f951c MD5 | raw file
 1class READ_CHARACTER
 2-- This example show how to use read_character.
 3-- The reading pattern is different from the one used with read_line.
 4-- It HAS to be different.
 5
 6create {ANY}
 7	make
 8
 9feature {}
10	make is
11		local
12			tfr: TEXT_FILE_READ
13		do
14			from
15				create tfr.connect_to("read_character.e")
16				tfr.read_character
17			until
18				tfr.end_of_input
19			loop
20				std_output.put_character(tfr.last_character)
21				tfr.read_character
22			end
23			tfr.disconnect
24		end
25
26end
27