![]() |
Section 8.1.2.1:
|
![]() |
The type definitions in this generic class specification fall into two groups :-
types SAME = ELT_NIL_ETP ; -- Auxiliary Types Element_Type = @ETP
This feature provides the nil value of the element type which is the class argument.
elt_nil | : ETP |
elt_nil(self : SAME) res : [ETP]
Since the sole argument is not optional then this pre-condition is vacuously true.
post (sub_type($NIL,Element_Type) and (res = Element_Type.nil)) or res = nil
This feature returns the appropriate nil value if ther argument type is a sub-type of $NIL, otherwise void.
This feature returns true if and only if the given element is of a type which sub-types from $NIL and has that nil value.
is_elt_nil | : BOOL |
elem : ETP | |
) : BOOL |
is_elt_nil(self : SAME, elem : ETP) res : BOOL
Since neither argument is optional then this pre-condition is vacuously true.
post res = (sub_type($NIL,Element_Type) and (res = Element_Type.nil))
This feature returns true if and only if the given element belongs to a type which sub-types from $NIL and has that nil value, otherwise false.
![]() |
Language Index | ![]() |
Library Index | ![]() |
Basic Index |
Comments
or enquiries should be made toKeith Hopper. Page last modified: Thursday, 29 March 2001. |
![]() |