ANSWER TO EXERCISE 78 | |
(See the NounDomain specification in Appendix A9.) This routine passes on any REPARSE_CODE, as it must, but keeps a matched object in its own third variable, returning the 'skip this text' code to the parser. Thus the parser never sees any third parameter. Global third; [ ThirdNoun x; x=NounDomain(player,location,0); if (x==REPARSE_CODE) return x; if (x==0) return -1; third = x; return 0; ]; |