Inform - Support - Patches

About Patches  

Compiler  
Library  

DM4 Errata  

Issue C62126

Extend/Verb problem with synonyms
Submitted by: Roger Firth     Appeared in: Compiler 6.21 or before     Fixed in: Compiler 6.30
Problem

Consider the second and third directives, which respectively prise apart 'ccc' from its synonyms 'aaa' and 'bbb', and then apply further synonyms to the redefined 'ccc':

  [ DoItSub; "Done it."; ];

  Verb 'aaa' 'bbb' 'ccc'
      * noun           -> Doit;

  Extend only 'ccc'
      * noun 'in' noun -> DoIt;

  Verb 'ddd' 'eee' = 'ccc';

Except that that isn't what happens. Instead, the 'ddd' and 'eee' synonyms are applied to the original definition of 'ccc':

  >SHOWVERB AAA
  Verb 'aaa' 'bbb' 'ddd' 'eee'
       * noun -> Doit

  >SHOWVERB CCC
  Verb 'ccc'
       * noun -> Doit
       * noun 'in' noun -> Doit
Solution (by Michael Coyne)

The problem is in verbs.c, in extend_verb, around lines 700. dictionary_set_verb_number is called to update the verb number for the "extended" verb to the new one, but no one ever fixes the entry in English_verb_list.

I have changed find_verb to find_or_renumber_verb and added a *new_number parameter. If new_number is NULL, the function returns the matching number, as the old find_verb did. Otherwise, it renumbers the match to *new_number. I did it this way because find_verb was only called in two places, and I figured this made more sense than duplicating the code and changing one line.


Last updated 17 April 2013. This web site has not been fully supported since April 2008. Information may be out of date. This page was originally managed by Roger Firth.