c programming style - READ THIS

John Collins jmc at inset.UUCP
Sat Aug 10 09:15:22 AEST 1985


In article <247 at bbncc5.UUCP> keesan at bbncc5.UUCP (Morris M. Keesan) writes:
>....................  From the C Reference
>Manual, section 7.2 (p. 187, K&R):  "The expression ++x is equivalent to x+=1.
>See the discussions of addition and assignment operators for information on
>conversions."  The "usual arithmetic conversions" in this case cause "a += 1"
>to be equivalent to "a += 1.0".

Interestingly enough the PDP11 C compiler could not do ++ and -- on floating
point numbers.... (Up to System III anyway).
-- 
John M Collins		....mcvax!ist!inset!jmc
Phone:	+44 727 57267
Snail Mail: 47 Cedarwood Drive, St Albans, Herts, AL4 0DN, England.



More information about the Comp.lang.c mailing list