home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / mac / programm / 20473 < prev    next >
Encoding:
Text File  |  1992-12-31  |  883 b   |  30 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!world!ivanski
  3. From: ivanski@world.std.com (Ivan M CaveroBelaunde)
  4. Subject: Re: One routine works, the other doesnt, WHY??
  5. Message-ID: <C04r8M.HH3@world.std.com>
  6. Organization: The World Public Access UNIX, Brookline, MA
  7. References: <1992Dec29.121933.1426@galaxy.gov.bc.ca>
  8. Date: Thu, 31 Dec 1992 15:33:57 GMT
  9. Lines: 19
  10.  
  11. cconstantine@galaxy.gov.bc.ca writes:
  12.  
  13. >Could someone please explain to me why the following routine gets compile time
  14. >errors under MPW C 3.2.4:
  15.  
  16. >curDev = GetMainDevice();
  17. >pixDepth = GetPixelDepth( curDev );                             
  18. >if ( pixDepth <> 8 )                                            
  19. >    DeathAlert( errNot8Bit );
  20.  
  21. Because the C operator for "not equal" is not "<>" (that's Pascal). It's
  22. "!=".
  23.  
  24. If it read (pixDepth != 8) it would work.
  25.  
  26. -Ivan
  27. ---
  28. Ivan Cavero Belaunde
  29. DiVA Corporation
  30.