PageRenderTime 5ms CodeModel.GetById 2ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/tutorial/agent/example6.e

http://github.com/tybor/Liberty
Specman e | 20 lines | 14 code | 3 blank | 3 comment | 0 complexity | 521844ef8bc3bd3695ee0e40a65acda9 MD5 | raw file
 1class EXAMPLE6
 2   --
 3   -- It is also possible to call infix operators as delayed calls.
 4   --
 5
 6create {ANY}
 7   make
 8
 9feature {ANY}
10   make
11      local
12         delayed_code: FUNCTION[TUPLE[CHARACTER], BOOLEAN]
13      do
14         delayed_code := agent 'a' < ?
15         print(delayed_code.item(['b']).to_string + "%N")
16         delayed_code := agent {CHARACTER} < 'b'
17         print(delayed_code.item(['a']).to_string + "%N")
18      end
19
20end -- class EXAMPLE6