Next: , Up: obj-exp   [Contents][Index]


10.25.6.1 <-/2

Synopsis

+Obj <- +Mesg

Arguments

Obj

object

Mesg

term

Description

Sends Mesg to Obj. A send message. The class of Obj must have a method defined for this message.

A clause with <-/2 as the principal functor of its head is a method definition clause. Such clauses only occur within the scope of a class definition. They are expanded at compile time.

Exceptions

instantiation_error

either argument is unbound.

domain_error

Mesg is not callable or Obj is not a valid object.

existence_error

Mesg is not a defined message for Obj.

Caveat

For reasons of efficiency, an Existence Error will only be raised if the code that sends the message is compiled with debugging enabled (see debug_message), or if the message is not determined at compile-time. In other circumstances, the message will simply fail.

Calls to the <-/2 predicate will be compiled into more efficient code if the obj_decl module is loaded at compile time.

See Also

<</2, >>/2, direct_message/4, message/4


Send feedback on this subject.