home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!think.com!ames!data.nas.nasa.gov!taligent!apple!applelink.apple.com
- From: SCHALK1@AppleLink.Apple.COM (Euro Tech Svcs, OOP Spec)
- Newsgroups: comp.sys.mac.oop.macapp3
- Subject: Re: CStr31 Array Syntax???
- Message-ID: <722186036.6756394@AppleLink.Apple.COM>
- Date: 19 Nov 92 03:54:00 GMT
- Sender: daemon@Apple.COM
- Organization: AppleLink Gateway
- Lines: 31
-
- Ken,
-
- CStr31 fPeriodNames[3];
- is equivalent to
- CStr31 fPeriodNames[3] = {CStr31::CStr31(), CStr31::CStr31(),
- CStr31::CStr31()};
-
- In ARM (C++ Annotated Reference Manual) page 264, it is stated that:
- "... it allowed an array of objects to be initialized by a standard function
- taking a pointer to function argument specifying what initialization needed to
- be done for each element in the array".
-
- So, CFront initializes by taking the adress of CStr31::CStr31() and iterating
- from 0 to 2.
-
- Now, CStr31::CStr31() is declared inline (in PascalString.h), and if you take
- the address of an inline function, an explicit (non-inline) copy has to be
- created (ARM page 102).
-
- This is what the compiler is warning you about. Nothing is wrong. Fix is to go
- into PascalString.h and remove the inline specification. (I advise against
- doing that, just ignore the warnings).
-
- Regards,
-
- Jeroen Schalk
- Object Programming Specialist
- European Technology Services
- Apple Computer Europe
- Currently in DTS
-
-