CompuServe Messages

#More bit field problems

    08-Jun-90 22:28:50
Fm: Harry Callesis 72025,117
To: Mike Spille/Manx 71545,1466
Mike – But that essentially eliminates the utility of the feature. If I really wanted to do the masking and shifting myself, I'd write the thing in assembler. The other compilers I've worked on (three C, one Pascal <where we used SETs to access bits in a word>) produced the code to use the feature as it was (or seems to me to be) intended. Perhaps Lattice could "adjust" (since you won't like it if I say "fix" 8^) ) this feature in a future release. I use Turbo C and Microsoft C on the PCs at work, and they both handle the situation as I would expect (actually, that's _why_ I expect it – I essentially learned the finer points of C using these programs). The Pascal compiler on my Atari (I know, this is C we're discussing, but it's an equivalent feature) will pack a 16-item set into a word for bit access. There's plenty of precedent for implementing bit fields this way, and I'm just disappointed that Lattice chose not to do so. Anyway, my program does work, and I do use the mask-and-shift method since there is no other way. I just think there should be. Nothing personal <grin>. Harry