/tutorial/time/example3.e

http://github.com/tybor/Liberty · Specman e · 27 lines · 21 code · 3 blank · 3 comment · 0 complexity · f4b42fa647631d8507b5936a88d55bfd MD5 · raw file

  1. class EXAMPLE3
  2. --
  3. -- Using the TIME_IN_ENGLISH class.
  4. --
  5. create {ANY}
  6. make
  7. feature {}
  8. make
  9. local
  10. time: TIME; format: TIME_IN_ENGLISH
  11. do
  12. time.update
  13. create format
  14. format.set_time(time)
  15. io.put_string("The complete format :%N")
  16. format.set_short_mode(False)
  17. format.print_on(io)
  18. io.put_new_line
  19. io.put_string("The short format :%N")
  20. format.set_short_mode(True)
  21. format.print_on(io)
  22. io.put_new_line
  23. end
  24. end -- class EXAMPLE3