Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site hadron.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!decwrl!pyramid!ut-sally!seismo!rlgvax!hadron!jsdy From: jsdy@hadron.UUCP (Joseph S. D. Yao) Newsgroups: net.lang.c Subject: Re: Two Birds with One Stone Message-ID: <119@hadron.UUCP> Date: Wed, 4-Dec-85 07:18:18 EST Article-I.D.: hadron.119 Posted: Wed Dec 4 07:18:18 1985 Date-Received: Sat, 7-Dec-85 03:12:38 EST References: <219@brl-tgr.ARPA> <6698@boring.UUCP> Reply-To: jsdy@hadron.UUCP (Joseph S. D. Yao) Organization: Hadron, Inc., Fairfax, VA Lines: 16 Keywords: software engineering, shifts, arithmetic Summary: S a y what you bl**dy M e a n ! In article <6698@boring.UUCP> jack@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@seismo.{CSS.GOV,ARPA,UUCP}