Path: utzoo!attcan!uunet!stretch.cs.mun.ca!leif!jgarland From: jgarland@kean.ucs.mun.ca Newsgroups: comp.lang.prolog Subject: Re: PDC prolog gripe/question Message-ID: <145400@kean.ucs.mun.ca> Date: 13 Oct 90 21:09:26 GMT References: <90285.232430F0O@psuvm.psu.edu> Organization: Memorial University. St.John's Nfld, Canada Lines: 47 In article <90285.232430F0O@psuvm.psu.edu>, F0O@psuvm.psu.edu writes: > I've been reading over the section in the book on how you can have > modules in PDC prolog. You have to make what they call a 'project file' > or what I call a make file. This is ok. What I don't like is: > > For each module, you have to put the name of the project at the top of > the file. > > The next part is taken right out of the book, pg 76: > > ALL THE MODULES IN A PROJECT NEED TO HAVE EXACTLY THE SAME GLOBAL > DATABASE AND GLOBAL DOMAINS DECLARATIONS. > > and pg 77: > > Global predicate declarations differ from local predicate declarations > because they must contain a description of the flow pattern(s) by which > each given predicate can be called. > > > > Good heavens! This seems like a lot of work to me. In Turbo Pascal, > to use other modules, all you need is a: > > USES module1 module2 module3 ... > > > Also, if I read the book right, why would you want to make a DATABASE > accessible to a module that might never use it? This does not seem like > good programming technique. > I do have to say, I have not tried any of this myself; just reading > the book sounds bad enough to scare me away. The Turbo pascal way of doing > modules sounds more elegant to me. > Do other people feel the same way, or am I just not understanding > something(quite possible :-) ). > > Personally, I just think of global declarations as .h files (in the C sense) and put them in include files. But as that takes you back towards C... John Garland jgarland@mun Bitnet jgarland@kean.ucs.mun.ca Internet