Often, it is useful for a child object to define a verb that *augments* the behavior of a verb on its parent object. For example, the root object (an ancestor of every other object) defines a :description() verb that simply returns the value of `this.description'; this verb is used by the implementation of the `look' command. In many cases, a programmer would like the description of some object to include some non-constant part; for example, a sentence about whether or not the object was `awake' or `sleeping'. This sentence should be added onto the end of the normal description. The programmer would like to have a means of calling the normal `description' verb and then appending the sentence onto the end of that description. The function `pass()' is for exactly such situations.
`Pass()' calls the verb with the same name as the current verb but as defined on the parent of the object that defines the current verb. The arguments given to the called verb are the ones given to pass() and the returned value of the called verb is returned from the call to pass(). The initial value of `this' in the called verb is the same as in the calling verb.
Thus, in the example above, the child-object's :description() verb might have the following implementation:
return pass(@args) + " It is " + (this.awake ? "awake." | "sleeping.");
That is, it calls its parent's :description() verb and then appends to the result a sentence whose content is computed based on the value of a property on the object.
In the above example, `pass()' would have worked just as well, since :description() is not normally given any arguements. However, it is a good idea to get into the habit of using `pass(@args)' rather than `pass(args[1])' or `pass()' even if the verb being pass()ed to is already known to take a set number of arguments or none at all. For one thing, though the args may be irrelevant to the code that you've written, it may be that the corresponding verb on the parent has been rewritten to take additional arguments, in which case you will want your verb to continue to work...