Results 1 to 10 of 42

Thread: pascal and learning 3d

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #17
    I don't know exactly how it goes, but i tested a bit too after your comment. TRGB2 is indeed 3 bytes for some reason.

    But these are both 8 bytes, and 5 if packed. Same with Lazarus and Delphi.
    Code:
    TRecord1 = record
      a: single;
      b: byte;
    end;
    
    TRecord2 = record
      b: byte;
      a: single;
    end;
    So it doesn't matter if the value is last one. Having only 1 variable type in record seems to be special case, that is not adding any padding.
    Last edited by User137; 30-11-2012 at 04:48 PM.

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
  •