/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

  1. class 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. create {ANY}
  6. make
  7. feature {}
  8. make is
  9. local
  10. tfr: TEXT_FILE_READ
  11. do
  12. from
  13. create tfr.connect_to("read_character.e")
  14. tfr.read_character
  15. until
  16. tfr.end_of_input
  17. loop
  18. std_output.put_character(tfr.last_character)
  19. tfr.read_character
  20. end
  21. tfr.disconnect
  22. end
  23. end