1.142 class send_method

A send_method object defines the mapping from a selector to an implementation for the send virtual machine operation. Send_method objects may be found using object<-send_method and executed using send_method->send.

See also class method and class behaviour.

See also
- class type
- host->call
- class method
- tool ClassBrowser
- object<-all_send_methods

1.142.1 Send methods

send_method ->send: receiver=object, argument=unchecked ...
Invoke a send-method on receiver. The remaining arguments provide the method arguments. They will be bound to the format arguments of the method according to the following rules:

  1. Assign all unbound (e.g. no instances of class :=) by position.
  2. If the last argument allows for multiple values, pack all remaining unbound arguments is a code_vector object and pass assign them to this last formal argument.
  3. If there are bound arguments, process them left-to-right, assigning them to there corresponding named format argument.

    If the named formal argument allows for multiple values, append the value of the binding to the vector of values.

    If the last argument allows for multiple values and there are remaining unbound arguments append them to the vector of values.

  4. Assign all unassigned arguments to @default. Finally all arguments are type-checked (see type->validate and type<-translate. Examples: