-----Oryginalna wiadomość----- From: Vlad Khorsun Sent: Tuesday, March 17, 2015 11:24 AM To: firebird-devel@lists.sourceforge.net Subject: Re: [Firebird-devel] Firebird 3 API demo usage with Pascal
17.03.2015 11:54, liviusliv...@poczta.onet.pl wrote: >>> After re-reading docs > >>> http://docwiki.embarcadero.com/RADStudio/XE6/en/Internal_Data_Formats#Record_Types > >>> i'd say you should not use nor special(explicit) alignment nor packed >>> records. Just ensure you have {$A+} when record type is declared and >>> you use record members with data types of correct size each. > >>> Sorry, i have no Delphi right now to check by myself > >>> Regards, >>> Vlad > > Thank you Vlad but this is default settings > I tried this before (setting explicitly) > look at my answer to Dimitry Sibiryakov how this look in bytes >> I'm sorry, but that answer is totally unclear for me. I see no record >> declaration >>there, i see no compiler directive is active when record is declared, i >>don't know >>what values was (should be) assigned to what record member to compare it >>with memory >>dump. >> Could you show us record declaration (with explicit {$A+} specified) >> and offsets >>of each record member ? >>Regards, >>Vlad i assign it to whole record not for member by member but how offsets can hange any in this representation? I should do for one integer "word" alignment but for smallint dword and for next integer different alignment then for first integer? I should gues this or are some rules? Somewhere in FBSource - that after smallint another integer+WordBool should be aligned whith DWord? 204 {$CC}, 187 {$BB}, 170 {$AA}, 17 {$11}, 0, 0 <== Integer + WordBool(IsNull) - Word alignment , 221 {$DD}, 51 {$33}, 0, 0, 0, 0 <== Smallint+ ???? - DWORD alignemnt , 204 {$CC}, 187 {$BB}, 170 {$AA}, 17 {$11}, 0, 0, 0, 0 <== Integer + ???? here also DWord? not Word as First Integer? , 221 {$DD}, 204 {$CC}, 187 {$BB}, 34 {$22}, 0, 0 <== Integer + think about this simplified record declaration - how will you declare this? GenRowsInMessage = record iValue: Integer; iValueNull: WordBool; sValue: SmallInt; sValueNull: WordBool; iValue2: Integer; iValue2Null: WordBool; end regards, karol Bieniaszewski ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel