Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!sunybcs!bingvaxu!marge.math.binghamton.edu!sullivan From: sullivan@marge.math.binghamton.edu (fred sullivan) Newsgroups: comp.lang.modula2 Subject: Re: Bit shifting operations Message-ID: <669@bingvaxu.cc.binghamton.edu> Date: Wed, 26-Aug-87 16:35:41 EDT Article-I.D.: bingvaxu.669 Posted: Wed Aug 26 16:35:41 1987 Date-Received: Fri, 28-Aug-87 06:30:27 EDT Sender: news@bingvaxu.cc.binghamton.edu Reply-To: sullivan@marge.math.binghamton.edu (fred sullivan) Organization: Department of Mathematical Sciences, SUNY-Binghamton Lines: 21 >Supposedly, Modula-2 is a good systems programming language; but it >has no native bit-shifting operations. Aren't bit-shifting >operations important tools for EFFICIENT systems programming? >Turbo Pascal and "C" have native bit-shifting operations, but not >Modula-2. Was this omission a wise design decision? I would like >to read some opinions on this question. I agree that I sometimes wish that they existed. On the other hand, bit operations are inherently machine dependent. Since such things are going to vary from machine to machine anyway, perhaps Prof. Wirth decided that it should be up to Modula implementors for various machines to include shifts or not. At least one compiler (the Powell compiler for Ultrix) includes a bit manipulation module which implements shifts as in-line code (although they appear to the user to be procedures). At any rate, most things (e.g. setting up masks) can be done effiently with Intsets anyway. Fred Sullivan Department of Mathematical Sciences State University of New York at Binghamton Binghamton, New York 13903 Email: sullivan@marge.math.binghamton.edu