in reply to Binary data type?

Or, am I trying too hard?

Could be... The only rationale for bit vectors these days, I think, would be when you have to stuff things into hardware registers or send binary codes over serial ports to control devices at something close to the level of a driver. If that's what you're after, then vec() is your friend.

But if you're just trying to save space in memory, don't bother. Use plain integers and letters in a hash or simple array, and you'll get done a lot quicker with fewer mishaps.

Replies are listed 'Best First'.
Binary data type?
by KPeter0314 (Deacon) on Oct 17, 2002 at 15:44 UTC
    After more meditation I seem to have come to the same conclusion. An array (hashed or not...) is probably a better way to go for a couple of reasons.
    1. It can contain more that a trit. ;-)
    2. I can easily avoid assigning duplicates to the same slot.
    3. Arrays are relatively easy to deal with.
    4. Quicker to write.
    I was just having a flashback to my computer science college days and thinking about other ways to store the data. I wouldn't mind dealving into the vec() bitwise operations evenutally, but I think I have convinced myself otherwise for this project.