/src/wrappers/glib/examples/string_example.e

http://github.com/tybor/Liberty · Specman e · 25 lines · 22 code · 3 blank · 0 comment · 0 complexity · 3d8dbca2107dbc9ad9da495b80b81050 MD5 · raw file

  1. indexing
  2. copyright: "(C) 2005 Paolo Redaelli "
  3. license: "LGPL v2 or later"
  4. date: "$Date:$"
  5. revision: "$REvision:$"
  6. class STRING_EXAMPLE
  7. creation make
  8. feature
  9. string: G_STRING
  10. make is
  11. local i: INTEGER; c: CHARACTER
  12. do
  13. create string.make (10)
  14. print ("String count is "+string.count.out+"%N")
  15. from i:=0; c:='a' until c>'j' loop
  16. string.put(c,i)
  17. c:=c.next
  18. i:=i+1
  19. end
  20. print(string.to_string)
  21. end
  22. end