Re: Inform programming--ÿÿÿÿÿ


9 Jun 1995 15:14:40 +0100

Tim Middleton (tim.middleton@canrem.com) wrote:

> 7C= I know I can copy the verb defs over in my own code and add a synonym
> 7C= that way. What I'd like to know is if there is an easier, one-line way
> 7C= (using the Extend directive, for example)

[ snip ]

> At any rate, in one of the "exercises" it is shown now to make the Mayan
> `word color' (read the explanation in the example!) work the same as the
> "look" command. The definition is as follows.
>
> Verb "turquois" "yax" * -> Look;
>
> This declaration will (presumably--i haven't actually tried it <G>) convert
> the user inputting "turquios" or "yax" into the standard "look" command.

Not strictly true. The above example defines a new verb, 'turquois' or
'yax'. Typing this verb on its own calls the LookSub routine. However, the
actual 'look' verb in the library has several variations as well, all of
which need an extension to the verb definition. Eg:

Verb "look" [ ... ]
* "at" noun -> Examine
* "under" noun -> LookUnder
[ ... ]

Therefore, while the player can 'look under carpet' he could not 'turquois
under carpet'. To enable this (and other variations) the entire 'look' verb
definition would need to be mirrored into your own source for the 'turquois'
command.

Hope this helps.

-- 

Jools jools@arnod.demon.co.uk