Style guides and portability

Richard Tobin richard at aiai.ed.ac.uk
Wed Jan 16 02:02:51 AEST 1991


>>where it is important that the number of bits == 32, or ...

>But there is no guarantee that there will BE such an integral type!

True.  But at least it tells you that the programmer wrote the code on
the assumption that there would be.

Of course, most code has no need of such assumptions, but sometimes the
need for efficiency outweighs the need for portability.

In general, I would say it was better to typedef a name for the specific
purpose, with a comment saying that it must be 32 bits.

-- Richard
-- 
Richard Tobin,                       JANET: R.Tobin at uk.ac.ed             
AI Applications Institute,           ARPA:  R.Tobin%uk.ac.ed at nsfnet-relay.ac.uk
Edinburgh University.                UUCP:  ...!ukc!ed.ac.uk!R.Tobin



More information about the Comp.lang.c mailing list