[fpc-pascal] Converting C's bit field struct
leledumbo
leledumbo_cool at yahoo.co.id
Wed Aug 13 13:08:01 CEST 2008
Vincent Snijders wrote:
>
> FPC supports bitpacked records. I cannot find it in the docs right now.
>
Oh... didn't know if such a thing exists.
Vinzent Höfler wrote:
>
> type
> Unsigned_7 = 0 .. (1 shl 7) - 1;
> Unsigned_20 = 0 .. (1 shl 20) - 1;
>
> type
> page_t = bitpacked record
> present : boolean;
> rw : boolean;
> user : boolean;
> accessed : boolean;
> dirty : boolean;
> unused : Unsigned_7;
> frame : Unsigned_20;
> end;
>
Weird... never seen anything like this before :confused:, but I'll try.
Thanks.
--
View this message in context: http://www.nabble.com/Converting-C%27s-bit-field-struct-tp18959002p18961028.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
More information about the fpc-pascal
mailing list