| Did you know ... | Search Documentation: |
| object->has_value |
<-Name and
compare the result to the argument. Succeed if they are equal (have same
reference), fail otherwise.
This method is intended to test on attribute values. Similar and more
powerful results can be obtained using class ==.. It's usage is to be
preferred. The following code
objects and Prolog fragments all test whether the point<-x
of the point object @p
equals 3:
Prolog:
get(@p, x, 3) % Uses Prolog unification send(@p, has_value, x, 3)
Code fragments:
message(@p, has_value, x, 3) @p?x == 3
object->not_has_value
is equivalent to object->has_value,
but returns the inverse result. object->is_on
is equivalent to object->has_value: @on
and object->is_off
is equivalent to object->has_value: @off.
->is_on ->is_off \== ->not_has_value