7.2 Performing operations on signatures

7.2.2 Signatures for undefined methods

So far, you have only been able to determine the method combinations for methods which are defined explicitly. If there are a large number of potential methods that could be defined, it can be awkward to define a method and paste it into the generic function browser just so that you can see its method combination.

FreeLisp provides a way of looking at method combinations without actually defining the methods they relate to. This lets you experiment with the classes in your code without having to change the state of the environment.

You can generate these combinations simply by adding the appropriate signatures, using the Signature > Add.

In the last section, you define methods which let you feed mammals and animals. There is, however, no equivalent method defined for reptiles. To look at the method combination for such a method, without actually defining it, do the following.

1. Choose Signature > Add.

A dialog box appears containing the form (T).

2. Using the Backspace and arrow keys, change this form to (reptile).

The signature (reptile) now appears in the 'Signatures' list pane.

3. To see the method combination for this signature, just select it.

The method combination is displayed in the 'Method Combination' display pane.

You may want to get rid of any signatures that you add to the generic function browser. To do this, select the signature to be removed and choose Signature > Remove. Note that you cannot remove the signatures of any methods that are actually defined.


FreeLisp User's Guide - 5 FEB 1996

Generated with Harlequin WebMaker