From: marcoschmidt@geocities.com (Marco Schmidt)
Subject: Re: Beginner's questions
Date: 1999/05/03
Date: 1999-05-03T00:00:00+00:00 [thread overview]
Message-ID: <372e96bd.6020927@news.rwth-aachen.de> (raw)
In-Reply-To: m3k8urxorq.fsf@mheaney.ni.net
On Sun, 02 May 1999 19:15:01 GMT, Matthew Heaney
<matthew_heaney@acm.org> wrote:
Thanks for your answer.
>> 1) I couldn't find out how to use bitwise operations "and" and "or"
>> (which would be "and" / "or" in Pascal and "&" / "|" in C). Do I have
>> to include a certain package?
>
>Those operations predefined for all modular types. Were you using an
>integer type?
Yes, but I want to use "and" and "or" for bitwise manipulation, not
logical operations which evaluate to boolean. I want to fill an array
of 64 Integer values with the number of "on" bits in the numbers 0 to
63, so the resulting array should look like this:
index : value
-------------
0 : 0
1 : 1
2 : 1
3 : 2
4 : 1
5 : 2
and so on. It's a lookup table I want to use in another part of the
program.
In Pascal, logical and bitwise operators have the same name (and /
or), while there are different operators in C, C++ and Java (& and &&,
| and ||). I need the & and | version.
Regards,
Marco
next prev parent reply other threads:[~1999-05-03 0:00 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-05-02 0:00 Beginner's questions Marco Schmidt
1999-05-02 0:00 ` Matthew Heaney
1999-05-03 0:00 ` Marco Schmidt [this message]
1999-05-03 0:00 ` Matthew Heaney
1999-05-03 0:00 ` Andreas Winckler
1999-05-03 0:00 ` Matthew Heaney
1999-05-03 0:00 ` Andreas Winckler
1999-05-03 0:00 ` David Starner
1999-05-04 0:00 ` Andreas Winckler
1999-05-04 0:00 ` Larry Kilgallen
1999-05-04 0:00 ` Martin C. Carlisle
1999-05-04 0:00 ` Larry Kilgallen
1999-05-05 0:00 ` Andreas Winckler
1999-05-03 0:00 ` dennison
1999-05-04 0:00 ` Tucker Taft
1999-05-04 0:00 ` dennison
1999-05-10 0:00 ` Tucker Taft
1999-05-04 0:00 ` czgrr
1999-05-04 0:00 ` Nick Roberts
1999-05-07 0:00 ` Robert Dewar
1999-05-07 0:00 ` David Starner
1999-05-08 0:00 ` ak
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox