[fpc-devel] Packed record integers and x86_86

2019-03-27 Thread DJ Coertzen
Hi there, I need a solution for a packed record containing 4-byte 32-bit integers and cardinals, and other byte 8 bit and word 16 bit sized variables to overlay over a stream. Example: *type* * TMyBinaryHeader = packed record* *Sender: Cardinal;* *Target: Cardinal;* *Refere

Re: [fpc-devel] Packed record integers and x86_86

2019-03-27 Thread Sven Barth via fpc-devel
DJ Coertzen schrieb am Mi., 27. März 2019, 18:27: > Hi there, > > I need a solution for a packed record containing 4-byte 32-bit integers > and cardinals, and other byte 8 bit and word 16 bit sized variables to > overlay over a stream. > > Example: > *type* > * TMyBinaryHeader = packed record* >

Re: [fpc-devel] Packed record integers and x86_86

2019-03-27 Thread Christo Crause
On Wed, 27 Mar 2019, 19:27 DJ Coertzen, wrote: > Hi there, > > I need a solution for a packed record containing 4-byte 32-bit integers > and cardinals, and other byte 8 bit and word 16 bit sized variables to > overlay over a stream. > > Example: > *type* > * TMyBinaryHeader = packed record* > *

Re: [fpc-devel] Packed record integers and x86_86

2019-03-27 Thread DJ Coertzen
On Wed, Mar 27, 2019 at 7:48 PM Christo Crause wrote: > > > On Wed, 27 Mar 2019, 19:27 DJ Coertzen, > wrote: > >> Hi there, >> >> I need a solution for a packed record containing 4-byte 32-bit integers >> and cardinals, and other byte 8 bit and word 16 bit sized variables to >> overlay over a st

Re: [fpc-devel] Packed record integers and x86_86

2019-03-27 Thread DJ Coertzen
On Wed, Mar 27, 2019 at 7:48 PM Christo Crause wrote: > > > On Wed, 27 Mar 2019, 19:27 DJ Coertzen, > wrote: > >> Hi there, >> >> I need a solution for a packed record containing 4-byte 32-bit integers >> and cardinals, and other byte 8 bit and word 16 bit sized variables to >> overlay over a st

Re: [fpc-devel] Packed record integers and x86_86

2019-03-27 Thread DJ Coertzen
On Wed, Mar 27, 2019 at 7:47 PM Sven Barth via fpc-devel < fpc-devel@lists.freepascal.org> wrote: > DJ Coertzen schrieb am Mi., 27. März 2019, > 18:27: > >> Hi there, >> >> I need a solution for a packed record containing 4-byte 32-bit integers >> and cardinals, and other byte 8 bit and word 16 b

Re: [fpc-devel] Packed record integers and x86_86

2019-03-27 Thread Pierre Muller
> ___ > fpc-devel maillist  -  fpc-devel@lists.freepascal.org > > http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel > > > Pointer arithmetic: > *for Indx := 0 to SizeOf(TTCPPackageHeader

Re: [fpc-devel] Packed record integers and x86_86

2019-03-27 Thread J. Gareth Moreton
I think the official unsigned 32-bit integer type in Pascal is "LongWord". As others have said, be aware that pointers are 64-bit under x64... that's kind of why it's called x64!  If you absolutely must have a packed record with 32-bit types, I recommend changing Sender and Target to indices that

Re: [fpc-devel] Packed record integers and x86_86

2019-03-28 Thread Karoly Balogh (Charlie/SGR)
Hi, On Thu, 28 Mar 2019, J. Gareth Moreton wrote: > I think the official unsigned 32-bit integer type in Pascal is > "LongWord". As others have said, be aware that pointers are 64-bit under > x64... that's kind of why it's called x64!  If you absolutely must have > a packed record with 32-bit typ

Re: [fpc-devel] Packed record integers and x86_86

2019-03-28 Thread J. Gareth Moreton
Heh, much better - thank you! On Thu 28/03/19 14:31 , "Karoly Balogh (Charlie/SGR)" char...@scenergy.dfmk.hu sent: Hi, On Thu, 28 Mar 2019, J. Gareth Moreton wrote: > I think the official unsigned 32-bit integer type in Pascal is > "LongWord". As others have said, be aware that pointers

Re: [fpc-devel] Packed record integers and x86_86

2019-03-28 Thread Marco van de Voort
Op 2019-03-28 om 15:31 schreef Karoly Balogh (Charlie/SGR): (Unless it also has to compile with say, Delphi.) Everybody has {$pointermath on} is the include file included in every unit nowadays. Or at least I hope :-) ___ fpc-devel maillist - fpc-d