djnowak@luna.dpl.scg.hac.com (David Nowak) (06/16/89)
Every Unit definition in the PIncludes folder of MPW 3.0 has a header
format of the following type:
{
Created: some time
XXXXXX.p
Pascal Interface to the Macintosh Libraries
Copyright Apple Computer, Inc. 1985-1988
All rights reserved
}
{$IFC UNDEFINED UsingIncludes}
{$SETC UsingIncludes := 0}
{$ENDC}
{$IFC NOT UsingIncludes}
UNIT XXXXXX;
INTERFACE
{$ENDC}
{$IFC UNDEFINED UsingXXXXXX}
{$SETC UsingXXXXXX := 1}
{$I+}
{$SETC XXXXXXIncludes := UsingIncludes}
{$SETC UsingIncludes := 1}
{$IFC UNDEFINED UsingTypes}
{$I $$Shell(PInterfaces)Types.p}
{$ENDC}
{$SETC UsingIncludes := XXXXXXIncludes}
where XXXXXX corresponds to the name of the unit file. I am curious to know
what do these compiler directives do?
Thanks in advance for the help.
Dave Nowak
djnowak@luna.dpl.scg.hac.com
mp@laura.UUCP (Michael Pickers) (06/19/89)
In article <4017@hacgate.scg.hac.com> djnowak@luna.dpl.scg.hac.com (David Nowak) writes: > Every Unit definition in the PIncludes folder of MPW 3.0 has a header >format of the following type: >{$IFC UNDEFINED UsingIncludes} >{$SETC UsingIncludes := 0} >{$ENDC} ........ >where XXXXXX corresponds to the name of the unit file. I am curious to know >what do these compiler directives do? This is one of those postings which make me wonder if the questioner has a legal copy of the product. If he has, all it takes to answer the question is to read the f.... manual. Michael Pickers Computer Science Department, University of Dortmund IRB - Informatik Rechner Betriebsgruppe 4600 Dortmund 50, P.O. Box 500500, W.-Germany E-mail address UUCP: mp@unido.uucp (...uunet!unido!mp) BITNET: mp@unido.bitnet
cremer@Apple.COM (Mike Cremer) (06/20/89)
In article <4017@hacgate.scg.hac.com> djnowak@luna.dpl.scg.hac.com (David Nowak) writes: > Every Unit definition in the PIncludes folder of MPW 3.0 has a header >format of the following type: >{$IFC UNDEFINED UsingIncludes} >{$SETC UsingIncludes := 0} >{$ENDC} ........ >where XXXXXX corresponds to the name of the unit file. I am curious to know >what do these compiler directives do? MPW 3.0 header files have been broken out to match the structure of _Inside Macintosh_. However, several of the files depend on definitions in other files. Most headers require the same base definitions (like "{PInterfaces}Types.p") and it would be pointless and time-consuming to read "Types.p" every time a new header file was parsed. The compiler directives allow MPW Pascal to intelligently determine which header files need to be included and which have already been parsed. Hope this helps. $mike cremer .............................. Tear Here .............................. Apple Computer, Inc. admits no responsibility for what I write. I don't blame them. "In a nutshell, sex is more fun than logic. One cannot prove this, but it IS, in the same sense that Mt. Everest IS, or that Alma Cogan ISN'T. Goodnight." -- J. Cleese