/tutorial/agent/example4.e

http://github.com/tybor/Liberty · Specman e · 18 lines · 12 code · 3 blank · 3 comment · 0 complexity · 903fec62021f3fdae380ac143d8ecdf3 MD5 · raw file

  1. class EXAMPLE4
  2. --
  3. -- The target itself can be an open operand:
  4. --
  5. create {ANY}
  6. make
  7. feature {ANY}
  8. make
  9. local
  10. my_array: ARRAY[FRUIT]
  11. do
  12. my_array := {ARRAY[FRUIT] 1, << create {PEACH}, create {APPLE} >> }
  13. my_array.for_each(agent {FRUIT}.display)
  14. end
  15. end -- class EXAMPLE4