[m-dev.] special module initialisation code

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Mar 21 21:33:35 AEDT 2000


On 21-Mar-2000, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> 
> A simple near-term approach would be to add to mkinit.c an option
> that gives a list of C functions to call before invoking main/2.
> This avoids the problem of paging in hundreds of initialization functions
> (since usually there will be zero or one such functions), and throws the
> problem of determining the proper order back to the programmer (who has
> to give the functions in their order of invocation).

How would that be better than letting the programmer call
whatever Mercury procedures they like directly from main/2?

Is writing `C2INITFLAGS = --init-func foo --init-func bar'
in your Mmakefile really any easier than writing

	main --> foo, bar, ...

in your Mercury source file?

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list