Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: data format incompatibilities (FPC vs Delphi)

  1. #11

    data format incompatibilities (FPC vs Delphi)

    Quote Originally Posted by captainproton
    Am I confused? Did someone say that expecting Delphi and FPC to do something the same was silly! I thought both were PASCAL - or are you referring to the way the compiler handles this stuff.
    Ofcourse they are both pascal with same syntax and functionality, but nothing dictates on how the compiler has to be written internally or how it has to store helper structures for strings and dynamic arrays, and the compiler can store the data internaly as it pleases, so FPC and delphi stores strings and dynamic arrays internally differently, so if you analyse pointers to specific blocks to data in arrays (@array[1, 2]), and to array itself (@array), you will see they differ a lot, and the data at those location differs as well.
    This is my game project - Top Down City:
    http://www.pascalgamedevelopment.com...y-Topic-Reboot

    My OpenAL audio wrapper with Intelligent Source Manager to use unlimited:
    http://www.pascalgamedevelopment.com...source+manager

  2. #12

    data format incompatibilities (FPC vs Delphi)

    Thanks Delfi - I knew I was confused, it happens a lot to me.

    Craig
    Who is this "General Failure" and why is he reading my hard disk?
    <br />
    <br /><A href="http://ps.craigedgar.com" target="_blank">Picture Slots - A Unique Slot Machine! Create your own Reels using your own Digital Photographs.</A>

  3. #13

    data format incompatibilities (FPC vs Delphi)

    You cannot depend on internal binary structure of managed types.

    ansistrings and arrays (dynamic) are managed types, they both have some voodoo, and even between versions of FPC or Delphi itself they can change these voodoo hidden parts.

    You should only save the "data" not the "metadata". I'm pretty positive alot has changed between delphi itself in this regard in all the versions, and I bet noone whined about it

    If you save a dynarray as a whole you're doing something terribly wrong.
    Feel the power of Open Source.
    <br />Feel the power of Free Pascal.

  4. #14

    Re: data format incompatibilities (FPC vs Delphi)

    Quote Originally Posted by Chebmaster
    2). The set size. In Delphi sets take no more bytes than necessary, having length of (elements div 8 ) bytes. In FPC, sets have either 4 bytes in size (those with 32 elements or less) or 32 bytes, there are no other options.
    It could be that this is closer to Delphi with FPC 2.2

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •