home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / mac / oop / macapp3 / 18 < prev    next >
Encoding:
Internet Message Format  |  1992-11-19  |  1.3 KB

  1. Path: sparky!uunet!think.com!ames!data.nas.nasa.gov!taligent!apple!applelink.apple.com
  2. From: SCHALK1@AppleLink.Apple.COM (Euro Tech Svcs, OOP Spec)
  3. Newsgroups: comp.sys.mac.oop.macapp3
  4. Subject: Re: CStr31 Array Syntax???
  5. Message-ID: <722186036.6756394@AppleLink.Apple.COM>
  6. Date: 19 Nov 92 03:54:00 GMT
  7. Sender: daemon@Apple.COM
  8. Organization: AppleLink Gateway
  9. Lines: 31
  10.  
  11. Ken,
  12.  
  13. CStr31 fPeriodNames[3];
  14. is equivalent to
  15. CStr31 fPeriodNames[3] = {CStr31::CStr31(), CStr31::CStr31(),
  16. CStr31::CStr31()};
  17.  
  18. In ARM (C++ Annotated Reference Manual) page 264, it is stated that:
  19. "... it allowed an array of objects to be initialized by a standard function
  20. taking a pointer to function argument specifying what initialization needed to
  21. be done for each element in the array".
  22.  
  23. So, CFront initializes by taking the adress of CStr31::CStr31() and iterating
  24. from 0 to 2.
  25.  
  26. Now, CStr31::CStr31() is declared inline (in PascalString.h), and if you take
  27. the address of an inline function, an explicit (non-inline) copy has to be
  28. created (ARM page 102).
  29.  
  30. This is what the compiler is warning you about. Nothing is wrong. Fix is to go
  31. into PascalString.h and remove the inline specification. (I advise against
  32. doing that, just ignore the warnings).
  33.  
  34. Regards,
  35.  
  36. Jeroen Schalk
  37. Object Programming Specialist
  38. European Technology Services
  39. Apple Computer Europe
  40. Currently in DTS
  41.  
  42.