🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #3158

Re: Modula2 for C programmers?

#3158
From: Pat Terry
Date: Mon, 22 Jan 1996 06:18
21 lines
1435 bytes
In article <4du11j$l31@weck.brokersys.com> jguthrie@brokersys.com writes:

>Michel De Rosa (aliath@nyongwa.montreal.qc.ca) wrote:

>: Bit operations.. unfortunately with pre-ISO compilers, we where usually
>: stuck with multiplying or dividing by 2, for shift operations (rotate is
>: a tad more involved), now ISO also provides functions for those.. for
>: and/or/xor etc.. it's always been possible to do these, using the set
>: operators.. first coerce to a BITSET...

>Please don't talk down to me.  I know how to manipulate bitsets, but 
>do WHAT to a BITSET?   As far as I know, NONE of the M2 compilers I have
>ever used allow me to convert between any kind of number and any kind of
>set.  Otherwise, I'd have used that rather than mucking about with assembly
>language.  

They should all allow you to CAST (coerce) to a BITSET and back

  e.g.    A := CARDINAL( BITSET(x) * BITSET(y) )

does AND, and so on.  
Technical Details
Message-ID: <cspt.1225.31032C36@giraffe.ru.ac.za>
Path: arc1-ca.pugleaf.net!cs-edwin.ru.ac.za!cspt
References: <erico-1801961940460001@infinitehell.cnmat.berkeley.edu> <4dqusf$d7k@weck.brokersys.com> <DLIGLJ.FDE@nyongwa.montreal.qc.ca> <4du11j$l31@weck.brokersys.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!cs-edwin.ru.ac.za!cspt
From: cspt@giraffe.ru.ac.za (Pat Terry)
Newsgroups: comp.lang.modula2
Subject: Re: Modula2 for C programmers?
Date: Mon, 22 Jan 1996 06:18:30 GMT
Organization: Rhodes University, Grahamstown, 6140.
Message-ID: <cspt.1225.31032C36@giraffe.ru.ac.za>
References: <erico-1801961940460001@infinitehell.cnmat.berkeley.edu> <4dqusf$d7k@weck.brokersys.com> <DLIGLJ.FDE@nyongwa.montreal.qc.ca> <4du11j$l31@weck.brokersys.com>
NNTP-Posting-Host: cs-edwin.ru.ac.za