Newsgroups: rec.arts.int-fiction
Path: news.duke.edu!newsgate.duke.edu!news-hog.berkeley.edu!ucberkeley!news.maxwell.syr.edu!nntp.abs.net!uunet!dca.uu.net!ash.uu.net!world!not-for-mail
From: buzzard@TheWorld.com (Sean T Barrett)
Subject: Re: [Inform] asking for it
Sender: news@world.std.com (Mr Usenet Himself)
Message-ID: <GMqFyA.DzG@world.std.com>
Date: Tue, 13 Nov 2001 09:34:58 GMT
References: <3bf091d4.4843540@news.student.utwente.nl> <MPG.165a67f47bfdcee598968d@news.freeserve.co.uk> <9spt26$1ps$1@ddawson.ddawson>
Nntp-Posting-Host: sgi01-g.std.com
Organization: The World Public Access UNIX, Brookline, MA
X-Newsreader: trn 4.0-test72 (19 April 1999)
Lines: 27
Xref: news.duke.edu rec.arts.int-fiction:94578

Daniel Dawson <ddawson@nospam-altavista.net> wrote:
>That may have been true at one point, but if it was, it has since been changed.
>Here is what we have in library 6/9:
>
>[ AskForSub;
>  if (noun==player) <<Inv>>;
>  L__M(##Order,1,noun);
>];

This does not implement the actual AskFor behavior; it handles
the case where you ask yourself for something, and the case where
you order another actor to ask for something.

As was previously reported, the interesting case is handled in
"deep in the parser" (actually in the main outer program loop):

        if (action==##AskFor && inputobjs-->2~=player && actor==player)
        {   actor=inputobjs-->2; inputobjs-->2=inputobjs-->3;
            inputobjs-->3=player; action=##Give;
        }

So redirecting to "AskFor" won't do the right thing because it
doesn't go through this part of the code (why? bad library design);
and there's no trivial way to redirect an order other than using an
ugly block of code as shown above to tweak the action.

SeanB
