From: Matthew Heaney <matthew_heaney@acm.org>
Subject: Re: Beginner's questions
Date: 1999/05/03
Date: 1999-05-03T00:00:00+00:00 [thread overview]
Message-ID: <m37lqqt7b0.fsf@mheaney.ni.net> (raw)
In-Reply-To: 372e96bd.6020927@news.rwth-aachen.de
marcoschmidt@geocities.com (Marco Schmidt) writes:
> >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 don't understand this answer.
"and", "or", "xor", and "not" for a modular type are bitwise operators
that return a modular value, not Boolean.
"and" and "or" aren't defined for (signed) integer types.
What kind of type type were you using?
Why isn't a modular type adequate?
> 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.
Signed integer types in Ada95 have neither logical nor bitwise
operators.
Modular (unsigned) types in Ada95 have bitwise operators "and" and
"or". They are not logical operators.
There is a way to define bitwise operators for a signed integer type,
but it's not going to be as efficient as using an unsigned type.
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
1999-05-03 0:00 ` Matthew Heaney [this message]
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-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-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