Newsgroups: rec.arts.int-fiction
Path: nntp.gmd.de!news.rwth-aachen.de!news.ruhr-uni-bochum.de!news.rhrz.uni-bonn.de!news.uni-stuttgart.de!news.belwue.de!scsing.switch.ch!swsbe6.switch.ch!swidir.switch.ch!in2p3.fr!univ-lyon1.fr!jussieu.fr!math.ohio-state.edu!howland.reston.ans.net!vixen.cso.uiuc.edu!usenet.ucs.indiana.edu!news.cs.indiana.edu!shulick@guava.ucs.indiana.edu
From: "Sam Hulick" <shulick@guava.ucs.indiana.edu>
Subject: Re: Inform: Disappointment in new manual
Message-ID: <199511230405.XAA27222@guava.ucs.indiana.edu>
Organization: Vallen Software
References: <199511201956.OAA11920@papaya.ucs.indiana.edu> <8kgK9EW00WB7EnecQW@andrew.cmu.edu>
Date: Wed, 22 Nov 1995 23:05:39 -0500 (EST)
Lines: 33

"Andrew C. Plotkin" <erkyrath+@CMU.EDU> writes:
>"Sam Hulick" <shulick@papaya.ucs.indiana.edu> writes:
>> Looking through the new manual, I figure I'd find something about #Stub,
>> but I didn't.  How does it work?  
>
>Stub is mentioned at the end of sect 30.4 as being not for public use;
>we are referred to the Inform Technical Manual. *That* says "If the
>routine has not been defined, define one which has N local variables
>and simply returns false."
>
>> Why is it that when I do this:
>> #Stub CreditRoutine 0;
>> then I define CreditRoutine() later, it complains about it being
>> multiply defined??  
>
>Obviously, Stub defines the routine; when you later define it again,
>you get an error. You can only do both if the Stub directive is
>*second*. 
>
>So why do you find Stub useful? The only use I can think of is writing
>library files.

Basically, I made my own file, library/myutils.h which has a default
help menu.  In case I ever distribute this .h file, I allow the user to
define a CreditRoutine() for the game credits.  If it's not defined
anywhere,it won't be included in the menu.  How can I achieve this
effect?

-- 
--- Sam Hulick ------------- shulick@indiana.edu ---------------------
Systems Consultant        | Homepage:
Indiana College Placement |    http://copper.ucs.indiana.edu/~shulick/
  and Assessment Center   | PGP public key available on request
