Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!hp4nl!charon!guido From: guido@cwi.nl (Guido van Rossum) Newsgroups: comp.sys.mac.programmer Subject: Re: Huh? What's wrong here... (A Simple Think C question) Message-ID: <3417@charon.cwi.nl> Date: 28 Apr 91 19:49:05 GMT References: <63903@bbn.BBN.COM> Sender: news@cwi.nl Lines: 19 rmitchel@bbn.com (Rob Mitchell) writes: >[correct diagnosis of earlier problem omitted] > IMHO, never use "int" when programming Mac. Use either "short" or > "long" (or better, declare typedefs for Int8, UInt8, etc.) which > helps when porting to other computer systems. I take exception with this advice. Portable programs should use 'int' for most common cases, especially function parameters, except: - always use long if values > 32767 are possible - use short for space conservation in structs and arrays, when values are guaranteed to be <= 32767. The reason is that 'int' is likely to generate the most efficient code, because it represents the natural word size (register size) for the architecture. --Guido van Rossum, CWI, Amsterdam