The \c escape

Bob Larson blarson at skat.usc.edu
Thu Jun 23 08:40:18 AEST 1988


In article <963 at ficc.UUCP> peter at ficc.UUCP (Peter da Silva) writes:
>(2) What's wrong with a readable and maintainable way of initialising a
>    32-bit unsigned integer to 0x464F524DL?
0x464F524DL
> You prefer that (or ('F'<<24)| ('O'<<16)|('R'<<8)|('M')) 
> to 'FORM'?

No, I use what I mean.  Are you trying to imply that the three
things you mention have the same value?  (I grant that on some
machines with some compilers they might.  I'm sure on other machines
and compilers they are different.)

Multi-character constants are "implemntation defined" (K&R2 page 193)
thus are for portable code UNDEFINED.

-- 
Bob Larson	Arpa: Blarson at Ecla.Usc.Edu	blarson at skat.usc.edu
Uucp: {sdcrdcf,cit-vax}!oberon!skat!blarson
Prime mailing list:	info-prime-request%ais1 at ecla.usc.edu
			oberon!ais1!info-prime-request



More information about the Comp.std.c mailing list