home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / mac / programm / 21962 < prev    next >
Encoding:
Text File  |  1993-01-22  |  1.5 KB  |  49 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!gatech!europa.asd.contel.com!howland.reston.ans.net!spool.mu.edu!sgiblab!newsun!news
  3. From: Duane Murphy <damurphy@wc.novell.com>
  4. Subject: &StringPtr -vs- StringPtr?
  5. Message-ID: <1993Jan22.165348.11313@novell.com>
  6. X-Xxdate: Fri, 22 Jan 93 17:01:17 GMT
  7. Sender: news@novell.com (The Netnews Manager)
  8. Nntp-Posting-Host: 130.57.72.123
  9. Organization: Novell, Inc.
  10. X-Useragent: Nuntius v1.1.1d12
  11. Date: Fri, 22 Jan 1993 16:53:48 GMT
  12. Lines: 35
  13.  
  14.  
  15. I have received some code (from a source to remain anonyumous) that is 
  16. supposed to work with MPW and Think C.  The MPW compiler says nothing, 
  17. but Think C whines about types not matching.  Here is where the problem 
  18. is:
  19.  
  20.     Str255    msg1, msg2;
  21.  
  22. ... // code deleted
  23.  
  24.     GetIndString(&msg1, errResID, errStringIndex);
  25.  
  26. The problem is &msg1.  The prototype for GetIndString is:
  27. (from ToolUtils.h)
  28.  
  29. pascal void GetIndString(Str255 theString,short strListID,short index); 
  30.  
  31. I have changed the call to:
  32.  
  33.     GetIndString(msg1, errResID, errStringIndex);
  34.  
  35. which seems (to me) to match to prototype better.
  36.  
  37. Who is right (according to ANSI)?  Is MPW being a slacker?  Is Think C 
  38. being picky?
  39.  
  40.  
  41. Thanks,
  42. ...Duane
  43.  
  44.   +------------------------+--------------------------------------------+
  45.   | Duane Murphy           | My opinions are mine, mine, and only mine; |
  46.   | damurphy@wc.novell.com |      Except when they are also yours.      |
  47.   | Macintosh Software QA  |                                            |
  48.   +------------------------+--------------------------------------------+
  49.