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. |