The <tt>SEND</tt> Statement



next up previous contents
Next: The SENDID Statement Up: C.3 The VOOPS Syntax Previous: The SENDSELF Statement

The SEND Statement

 

The method name (a LISP symbol) is applied to object (a C expression in a LISP string) with the SEND statement. This statement may appear anywhere in a template source file. The code produced by the SEND statement returns a null initializer of the method return type in case the method could not be found (i.e. there is a NULL entry in the class table at the corresponding location). For this purpose, the return type of the method has to be determined first by VOOPS. This implies - in contrast to the SENDCLASS statement - that the method name is defined already. If a return type has been found and it is of a void type, SEND produces a C if statement checking the existence of the method in the class table and calling the respective function by dereferencing the class table function pointer. If the return type has not been found or is not a void type, a C conditional expression is generated, also checking the existence of the method in the class table, dereferencing the function pointer on a positive check but issuing an appropriate error message and returning the null initializer of the return type in case the method does not exist in the class table. If the return type could not be determined, a SELF type is assumed.



Martin Stiftinger
Tue Nov 29 19:41:50 MET 1994