Hello,
The difficulty comes about when defining assignment. The rules
require a subroutine with exactly one intent in arg, and exactly
one intent out arg. There's no place for the bit offset to go.
Alvaro Fernandez wrote:
>
<snip requoted>
> Shouldn't it be possible to write a bit_vector type, though? If all you
> need is one flag, then you might as well use logical and be done with
> it. But when you really want single bit booleans is when you need a lot
> of them, such as for masks. I haven't sat down and tried to work it out
> very carefully, but it should be possible to encapsulate a bit vector
> type made up of reallocatable arrays of default integer. Then when you
> ask for a bit_vector of size n, it is implemented as an integer array of
> size n/(#bits in standard integer) + 1. You would implement the class
> methods with the bit manipulation routines already in the language.
>
<snip rest and sig>
I spent too much time trying to make this work a few years back.
You need a new class of address, the bit address, that you haven't
got access to now.
--
Cheers!
Dan Nagle
Purple Sage Computing Solutions, Inc.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|