On 15 Aug 2008, at 13:23, leledumbo wrote:
Tried Vinzent solution and it works :clap:!
The layout is I think the same as in C.
It may be the same as in C in certain cases on certain platforms when
compiled with a particular version of FPC. Do not depend on it always
being or remaining the
Tried Vinzent solution and it works :clap:!
The layout is I think the same as in C. The difference is that FPC generates
it as
resb 4
while C uses
.comm 16
I don't know what .comm for. But since everything runs fine, who cares?
I just have some issues where assignment to the fields using point
Original-Nachricht
> Datum: Wed, 13 Aug 2008 22:03:23 +0100
> Von: Jonas Maebe <[EMAIL PROTECTED]>
> An: FPC-Pascal users discussions
> Betreff: Re: [fpc-pascal] Converting C\'s bit field struct
>
> On 13 Aug 2008, at 11:59, Vinzent Höfler wrote:
>
> > Should be something like
On 13 Aug 2008, at 11:59, Vinzent Höfler wrote:
leledumbo wrote:
Since no one answers on message board, I'll post it here.
C struct:
typedef unsigned int u32int;
typedef struct page
{
u32int present: 1; // Page present in memory
u32int rw : 1; // Read-only if clear, readwrite
Hello,
Am 13.08.2008 um 13:23 schrieb Vincent Snijders:
Michael Van Canneyt schreef:
On Wed, 13 Aug 2008, leledumbo wrote:
Found on the net that Pascal doesn't provide it :-((
What if FPC creates it as an extension =)?
FPC has it, but only in MacPas mode.
I copied the example program from
Michael Van Canneyt schreef:
On Wed, 13 Aug 2008, leledumbo wrote:
Found on the net that Pascal doesn't provide it :-((
What if FPC creates it as an extension =)?
FPC has it, but only in MacPas mode.
I copied the example program from: http://qc.codegear.com/wc/qcmain.aspx?d=56480
Added
On Wed, 13 Aug 2008, leledumbo wrote:
>
> Found on the net that Pascal doesn't provide it :-((
> What if FPC creates it as an extension =)?
FPC has it, but only in MacPas mode.
Michael.
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
ht
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 r
leledumbo wrote:
Since no one answers on message board, I'll post it here.
C struct:
typedef unsigned int u32int;
typedef struct page
{
u32int present: 1; // Page present in memory
u32int rw : 1; // Read-only if clear, readwrite if set
u32int user : 1; // Super
leledumbo schreef:
Found on the net that Pascal doesn't provide it :-((
What if FPC creates it as an extension =)?
FPC supports bitpacked records. I cannot find it in the docs right now.
Vincent
___
fpc-pascal maillist - fpc-pascal@lists.freepasca
Found on the net that Pascal doesn't provide it :-((
What if FPC creates it as an extension =)?
--
View this message in context:
http://www.nabble.com/Converting-C%27s-bit-field-struct-tp18959002p18960630.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
Since no one answers on message board, I'll post it here.
C struct:
typedef unsigned int u32int;
typedef struct page
{
u32int present: 1; // Page present in memory
u32int rw : 1; // Read-only if clear, readwrite if set
u32int user : 1; // Supervisor level only i
12 matches
Mail list logo