Hallo Martin,

Du schriebst am Fri, 8 Nov 2013 19:46:05 +0100:

>   Register = bitpacked RECORD
>                Field_1: $0000..$007f;
>                Field_2: $0000..$0003;
>                Field_3: $0000..$001f;
>                Field_4: $0000..$0001;
>                Field_5: $0000..$0001;
>              END;
> "
> which already looks a little bit better. :-)

Disregarding that it's identical to my example, I don't think it looks any
_better_, it in fact adds a lot of fuzz (the "$" signs and the many zeros)
that effectively hide the real information from immediate recognition.
I still maintain that for such a use, a direct bit size specfication would
be clearer.

On the other hand, your invention of the new keyword "bitpacked" looks
quite good to me, as it makes clear that this record definition describes a
densely packed data structure that's unequivocally defined - no "padding"
of any size, and no wasted space from "access optimisation" for some
processor.
My suggestion: if you're going to implement such a thing, use it.
(The "bitpacked" keyword, i.e.)

-- 
-- 
(Weitergabe von Adressdaten, Telefonnummern u.ä. ohne Zustimmung
nicht gestattet, ebenso Zusendung von Werbung oder ähnlichem)
-----------------------------------------------------------
Mit freundlichen Grüßen, S. Schicktanz
-----------------------------------------------------------



------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to