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