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

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!nih-csl.dcrt.nih.gov!FAXCSL!FIXER
  3. From: fixer@faxcsl.dcrt.nih.gov (Chris Feelin' Groovy Tate)
  4. Subject: Re: Sozobon C - a free C for the Mac, too?
  5. Message-ID: <1992Dec31.134136.24364@alw.nih.gov>
  6. Sender: postman@alw.nih.gov (AMDS Postmaster)
  7. Reply-To: fixer@faxcsl.dcrt.nih.gov
  8. Organization: Computer Systems Laboratory, DCRT, NIH
  9. References: <29848@castle.ed.ac.uk>,<3917@isgtec.isgtec.com>
  10. Date: Thu, 31 Dec 1992 13:41:36 GMT
  11. Lines: 32
  12.  
  13. In article <3917@isgtec.isgtec.com>, ken@isgtec.com (Ken Newman) writes:
  14. >In article <29848@castle.ed.ac.uk> ngse18@castle.ed.ac.uk (J R Evans) writes:
  15. >> connected with Sozobon's assumption that sizeof(int)=4, whereas Think C 
  16. >> uses sizeof(int)=2, 
  17. >
  18. >Gag! Think C uses 16-bit ints?! Is there no option for 32-bit ints?
  19. >Wow, I thought Think C was a major full-featured compiler. This label
  20. >doesn't apply to 16-bit int compilers. :) I still like Laser C on the
  21. >ST, but would like to have a switch for 32-bit ints. (I have gcc as
  22. >well, if I need 32-bit).
  23.  
  24. Yes, THINK C has a switch for whether or not to make the 'int' type 32 bits.
  25.  
  26. Of course, if you're writing code which requires that 'int' be 32 bits, rather
  27. than declaring things 'long' that need to be that size, and 'short' when they
  28. don't, you're probably going to cause yourself some major headaches if you ever
  29. try to port the code to other platforms (and possibly even to other compilers). 
  30. Keeping your type declarations as unambiguous as possible is just good
  31. programming practice.
  32.  
  33. [Yes, I'm getting off my soapbox now... :-) ]
  34.  
  35. Remember, too, that at a purely practical level, arithmetic involving 16-bit
  36. values is faster than arithmetic using 32-bit values, so declaring things
  37. 'short' whenever possible is also an efficient thing to do from an object-code
  38. standpoint.
  39.  
  40. ------------------------------------------------------------------------------
  41. Christopher Tate             | Return of the CryptoSig (tm):
  42. Management Systems Designers |    LR KMBVALMH ZKM HD CNDMH, LV CLYY.  LR
  43.                              |    MDVALMH AKT HDMU CNDMH, BDX'QU DQUNYDDEUJ
  44. fixer@faxcsl.dcrt.nih.gov    |    TDIUVALMH.
  45.