Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!linus!encore!soper From: soper@encore.UUCP (Pete Soper) Newsgroups: comp.lang.modula2 Subject: Re: Bit shifting operations Message-ID: <1878@encore.UUCP> Date: Thu, 27-Aug-87 10:18:30 EDT Article-I.D.: encore.1878 Posted: Thu Aug 27 10:18:30 1987 Date-Received: Sat, 29-Aug-87 09:24:00 EDT References: <669@bingvaxu.cc.binghamton.edu> Reply-To: soper@encore.UUCP (Pete Soper) Organization: Encore Computer Corp., Marlboro, MA Lines: 20 In article <669@bingvaxu.cc.binghamton.edu> sullivan@marge.math.binghamton.edu (fred sullivan) writes: >>Supposedly, Modula-2 is a good systems programming language; but it >>has no native bit-shifting operations. Aren't bit-shifting >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) Actually, Prof. Wirth provided a slew of extremely machine dependent procedures in module SYSTEM for his single pass compiler. These procs expand to inline code and are extremely efficient. They include both arithmetic and logical shifts and a rotate function. Amazingly, though, NEW AND DISPOSE as predefined procedures are absent and each port involves implementing them. -- Pete Soper, Encore Computer Corp uucp: {necntc,talcott,ihnp4,decvax,allegra}!encore!soper