Inform - Support - Patches

About Patches  

Compiler  
Library  

DM4 Errata  

Issue L61016

"Read" verb on out-of-scope objects
Submitted by: Cedric Knight     Appeared in: Library 6/10 or before     Fixed in: Library 6/11
Problem

The response to the "read" verb is inappropriate when an object is mispelled or out-of-scope. Example:

  A dusty half-bound volume sits on a desk.

  >TAKE BOOK
  A magical something-or-other prevents you
  from taking the book.

  >WEST
  Light Room
  You can see a picnic hamper (which is closed)
  and a sign here.

  >READ BOOK
  [Parsing for the verb 'read' (3 lines)]
  [line 0 * noun -> Examine]
  [line 1 * 'about' topic 'in' noun -> Consult]
  [line 2 * topic 'in' noun -> Consult]
  What do you want to read in?

  >TAKE HAMPER
  Taken.

  >READ BOOK
  [line 2 * topic 'in' noun -> Consult]
  [Line successfully parsed]
  (in the sign)
  You discover nothing of interest in the sign.
Solution 1

Simply remove the third grammar line for the read verb from Grammar.h (about line 219). However, this effect could also occur in any grammar line of the form "verb topic preposition" including, for example, "look up chimney". In "say" this behaviour seems to be desirable.

Solution 2 (preferred)

In the ParseToken__() routine in Parserm.h insert the following 2 lines:

  if (o==-1 && (line_ttype-->(token_n+1) == PREPOSITION_TT))
    return GPR_FAIL;    ! don't infer if required preposition is absent

in the TOPIC_TOKEN section before the final line (circa 1665):

  return GPR_PREPOSITION;
Solution 3 (possible)

Could implement a "consultable" attribute to be used with the "consult" action. A related effect is exemplified by:

  >SAY XYZZY
  (to yourself)
  There is no reply.

Which is taken care of by add-on conversation libraries.


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.