Two Birds with One Stone

Joseph S. D. Yao jsdy at hadron.UUCP
Wed Dec 4 22:18:18 AEST 1985


In article <6698 at boring.UUCP> jack at boring.UUCP (Jack Jansen) writes:
> One problem. Does the ANSI standard specify what left-
>and right-shifts do, w.r.t. arithmatic values? And &|!^ etc?

I believe that this falls under the heading, "say what you mean."
If you  m e a n  that bits should shift left, say so; if you instead
m e a n  that you wish to multiply (resp., divide); say that, also!
Your compiler (at least, with optimisation on) should be able to do
the conversion if it speeds anything up; and future generations of
software maintenance personnel will sing your praises for doing
something in a way that is comprehensible to both man and machine.

>>Is it after midnight yet?	;-)<<
-- 

	Joe Yao		hadron!jsdy at seismo.{CSS.GOV,ARPA,UUCP}



More information about the Comp.lang.c mailing list