??ANSWER TO EXERCISE 19

Add the following lines, after the inclusion of Grammar:

[ SayInsteadSub; "[To talk to someone, please type ~someone, something~
or else ~ask someone about something~.]"; ];
Extend "answer" replace * topic -> SayInstead;
Extend "tell"   replace * topic -> SayInstead;
A slight snag is that this will throw out "nigel, tell me about the grunfeld defence'' (which the library will normally convert to an Ask action, but can't if the grammar for "tell'' is missing). To avoid this, you could (instead of making the above directives) Replace the TellSub routine (see Section 21) by the SayInsteadSub one.

Back to the exercise in section 16
Mechanically translated to HTML from third edition as revised 16 May 1997. Copyright © Graham Nelson 1993, 1994, 1995, 1996, 1997: all rights reserved.