Uses of "short" ?

Henry Spencer henry at utzoo.UUCP
Sat Sep 7 02:35:51 AEST 1985


> What are the reasons for using the type short in C ?  ...
> Specifically... on machines where sizeof (int) = sizeof (short).

Sloppiness in this is common (although not nearly as disastrous as
being sloppy on machines where sizeof(int) == sizeof(long)!).  The
main reason for distinguishing between the two is portability, i.e.
making your programs work on machines which violate this property
as well as machines which satisfy it.
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry



More information about the Comp.lang.c mailing list