Re: Inform: Disappointment in new manual


Wed, 22 Nov 1995 23:05:39 -0500 (EST)

"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