[M3devel] packing problem… how exactly does modula-3 pack data into records??
Dragiša Durić
dragisha at m3w.org
Thu Jan 19 18:47:39 CET 2012
Why wouldn't it be portable? What endiannes has to do with bit strings?
I don't think it is wrong to make it left-to-right-until-spent… As it's implementation dependent… ok… Why would not our implementation be left-to-….? :)
I think it's totally reasonable to expect from implementation exactly what I am expecting here and now.
As for C… I know several ways to implement this… And good ones. What I would like is to have cm3 doing it in obvious, intuitive way.
TIA
On Jan 19, 2012, at 5:28 AM, Jay K wrote:
> > packing data into record about packing bits left-right-until-spent?
>
> It is not portable.
> In particular, there is endianness variation.
> The C spec leaves things up to implementation.
>
> If you can, I recommend copying the data from C to a more portable less dense Modula-3 representation.
> Like what is now done throughout m3core/libm3 -- i.e. we don't interface with C at all through bitfields, nor do we try to line up with struct stat or any other struct, roughly speaking.
> (Maybe still a few, like struct linger).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20120119/6fc9fcaf/attachment-0002.html>
More information about the M3devel
mailing list