Article View: comp.lang.modula2
Article #3787Re: Bit-shifting Operations
From: Ken Yap
Date: Thu, 27 Aug 1987 19:36
Date: Thu, 27 Aug 1987 19:36
18 lines
1287 bytes
1287 bytes
>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
Technical Details
Message-ID:
<8708271750.AA03034@cayuga.cs.rochester.edu>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!rutgers!labrea!decwrl!decvax!ucbvax!CS.ROCHESTER.EDU!kenShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!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