Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- note
- description: "Summary description for {PAIR}."
- author: ""
- date: "$Date$"
- revision: "$Revision$"
- class
- PAIR
- inherit
- COMPARABLE
- create
- make
- feature {NONE} -- Initialization
- make (s, c: INTEGER)
- -- Initialization for `Current'.
- do
- char := s
- cnt := c
- left := VOID
- right := VOID
- end
- feature
- char: INTEGER
- cnt: INTEGER
- left: detachable PAIR
- right: detachable PAIR
- is_less alias "<" (other: like Current): BOOLEAN
- do
- Result := Current.cnt > other.cnt
- end
- set_left (s,c: INTEGER)
- local
- t: PAIR
- do
- create t.make (s, c)
- left := t
- end
- set_right (s,c: INTEGER)
- local
- t: PAIR
- do
- create t.make (s, c)
- right := t
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement