Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!labrea!decwrl!decvax!ucbvax!CS.ROCHESTER.EDU!ken From: ken@CS.ROCHESTER.EDU (Ken Yap) Newsgroups: comp.lang.modula2 Subject: Re: Bit-shifting Operations Message-ID: <8708271750.AA03034@cayuga.cs.rochester.edu> Date: Thu, 27-Aug-87 15:36:08 EDT Article-I.D.: cayuga.8708271750.AA03034 Posted: Thu Aug 27 15:36:08 1987 Date-Received: Sat, 29-Aug-87 10:30:20 EDT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 18 >Organization: U of Rochester, CS Dept, Rochester, NY In article <632@jimi.cs.unlv.edu> zimmerle@jimi.cs.unlv.edu (Robert Zimmerle) w rites: |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. Yes, but if you're going to compare, Turbo Pascal is not standard Pascal. A good question though is: what do people use bit shifting for in C and how would one write the equivalent in M-2? I know I use bit shifting to (1) make bitmasks, which M-2 can do with BITSETs and (2) (not so much now) multiply and divide, which shouldn't be a BITSET operation anyhow. So what can BITSETs not do? Ken