Path: utzoo!attcan!uunet!samsung!usc!apple!agate!shelby!snorkelwacker!ira.uka.de!smurf!urlichs From: urlichs@smurf.sub.org (Matthias Urlichs) Newsgroups: comp.sys.mac.programmer Subject: Re: MPW Pascal precompilation Message-ID: Date: 13 Oct 90 18:30:56 GMT References: <12631@hoptoad.uucp> Organization: University of Karlsruhe, FRG Lines: 38 In comp.sys.mac.programmer, article <12631@hoptoad.uucp>, tim@hoptoad.uucp (Tim Maroney) writes: < [ MPW Pascal precompiled header usage problem ] < < What's more, because of build-order considerations, sometimes a file < will not compile because of missing units, whereas it did build earlier < provided it came after another file whose unit list somewhow caused the < missing unit to be included in another file's precompiled header. What a sentence. ;-) < < How do others deal with optimizing the precompiled headers? I am using four (actually five) different schemes, depending on project complexity and header interrelatedness (in order of increasing project complexity and/or stuckness with a particular difficult problem): - Include (via $include) everything in "Everything.p", and put "Uses Everything" into every Pascal file. - Use different symbol folders, with the "-k :sysX:" option. - Use Norbert Lindenberg's MakeUses tool, which can generate exhaustive USES statements and Makefile lines for your Pascal source code. I'll ask him about availability. DON'T ASK ME FOR THIS (YET). - Rethink your code layout. In a properly thought-out hierarchy, this should not happen. I admit it would be a very big help if whoever wrote the MPW Pascal compiler had heard about dynamic memory allocation, and used it for the inclusion of files and the depth of $IF directives, so that we migght be able to use MPW's inclusion techniques in our own project. - Use Modula 2. The p1 compiler is pretty good, Modula has version checking between declaration and implementation, you can be more flexible / selective in what you include... -- in other words, the problem goes away. It even has object-oriented extensions, and works with MacApp quite well. -- Matthias Urlichs -- urlichs@smurf.sub.org -- urlichs@smurf.ira.uka.de /(o\ Humboldtstrasse 7 - 7500 Karlsruhe 1 - FRG -- +49+721+621127(0700-2330) \o)/