Jens Grabarske writes: > Hello! > > As I need a module manager that is able to do a little more than would be > allowed for a subclass of Module.manager, I'm currently writing one from > scratch using share/lib/init/Module.oz as a guideline. I noticed in that > code > that apart from the usual import / export / define parts of the functor, > there is also a part called "prepare" - that contains some declarations just > as "define" does. > > Unfortunately I couldn't find anything on that keyword in the documentation, > so the question goes to you: what is the difference between the "prepare" > and > the "define" section in a functor? >
Statements in the prepare/require section are executed at compile time. This is often useful to pre-generate constants, for example. There is a short explanation at the bottom of section 3.4 in the Oz Notation document: http://www.mozart-oz.org/documentation/notation/node3.html#chapter.context-free Unfortunately, there is no references for 'prepare'/'require' from the Global Index. There should be, could you make a bug report? Hope this helps. k _________________________________________________________________________________ mozart-users mailing list [email protected] http://www.mozart-oz.org/mailman/listinfo/mozart-users
