| Did you know ... | Search Documentation: |
| object->slot |
|int,
uncheckedThe slot specification (first argument) is either the slot-name, or the offset in the object (1-based). The latter possibility is for very specific (internal) use.
This method should only be used from a send-method that has the same
name (selector) as the slot and serves as a wrapper around
the slot to deal with side-effects:
:- pce_begin_class(person, object).
variable(date_of_birth, date, get, "When person was born").
...
date_of_birth(Person, Date:date) :->
( send(Date, after, new(date))
-> send(Person, report, error,
'Cannot be born in the future!'),
fail
; send(Person, slot, date_of_birth, Date)
).
Bugs: This message should also apply to object-level defined
attributes (see
object->attribute.
<-slot ->send_method ->send_method