Re: [fpc-pascal] Bitpacked bug?

2019-05-12 Thread Victor Campillo
On 12/5/19 18:21, Luca Olivetti wrote: With that last case, aren't you just defining one bit in the bitpacked record? In that case Thanks Luca, the case was the problem, I wanted a bitpacked record of word, this was a silly copy / paste error. -- Victor Campillo

Re: [fpc-pascal] Bitpacked bug?

2019-05-12 Thread Luca Olivetti
El 12/5/19 a les 17:58, Victor Campillo ha escrit: Hi, I think I found a bug with bitpackeds records. I have the next record.   TBitpacked = packed record     Case Integer Of   0 : (Word :  Word);   1 : (Byte :  array [0..1] of Byte);   2 : (Boolean: bitpacked Array [0..15]

Re: [fpc-pascal] Bitpacked bug?

2019-05-12 Thread Victor Campillo
On 12/5/19 18:36, Jeppe Johansen wrote: With this layout bit0 to bit15 will all point to bit0. You probably didn't mean to do the case inside the bitpacked record Yes, you are right, I don't want the case there, copy/paste error. One hour looking that record declaration and I could not point

Re: [fpc-pascal] Bitpacked bug?

2019-05-12 Thread Jeppe Johansen
On 5/12/19 5:58 PM, Victor Campillo wrote: case integer of     0: (bit0: Boolean);     1: (bit1: Boolean);     2: (bit2: Boolean);     3: (bit3: Boolean);     4: (bit4: Boolean);     5: (bit5: Boolean);     6: (bit6: Boolean);    

[fpc-pascal] Bitpacked bug?

2019-05-12 Thread Victor Campillo
Hi, I think I found a bug with bitpackeds records. I have the next record.   TBitpacked = packed record     Case Integer Of   0 : (Word :  Word);   1 : (Byte :  array [0..1] of Byte);   2 : (Boolean: bitpacked Array [0..15] of boolean);   3 : (Bit : bitpacked Record