/tutorial/cecil/JVM/root4.e

http://github.com/tybor/Liberty · Specman e · 30 lines · 23 code · 5 blank · 2 comment · 0 complexity · 5210ccbac549ca963ed8c3c998725e75 MD5 · raw file

  1. class ROOT4
  2. creation {ANY}
  3. make
  4. feature {ANY}
  5. make is
  6. -- Dummy root procedure to make some live code.
  7. do
  8. put_string(get_string)
  9. end
  10. get_string: STRING is
  11. do
  12. -- get a string that has capacity greater than count
  13. Result := "XXXXHi from ROOT4"
  14. Result.remove(1)
  15. Result.remove(1)
  16. Result.remove(1)
  17. Result.remove(1)
  18. end
  19. put_string (s: STRING) is
  20. do
  21. io.put_string("'")
  22. io.put_string(s)
  23. io.put_string("'%N")
  24. end
  25. end -- class ROOT4