Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7702465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:14:00+00:00 2026-05-31T23:14:00+00:00

I’m working with the variant record below. The variable instance is Kro_Combi. SizeOf(Kro_Combi) reports

  • 0

I’m working with the variant record below. The variable instance is Kro_Combi. SizeOf(Kro_Combi) reports 7812 bytes. SizeOf(Kro_Combi.data) reports 7810 bytes.
The sum of the SizeOf of all the other data structures composing the “non-directmode” case of the variant record also adds to 7810 bytes.

Why is there a two byte difference? I would like to have the two variant exactly overlay each other.

TKro_Combi = record
  case directmode:boolean of
    true : (
      data : array[0..7809] of byte
           );
    false : (
      Combi_Name            : array[0..23] of char;                //24
      Gap1                  : array[0..63] of byte;                // 24-87 (64)
      Ins_Effect_Group      : array[1..12] of TIns_Effect_Params;  //74 each,   (Ins_Effect_Data=9 bytes)  74*12 = 888
      Mast_Effect_Params    : array[0..229] of byte;               // 976-1205 : 230 bytes
      Vect_Aud__Drum_Params : array[0..97] of byte;                //1206-1303  : 98 bytes
      Karma_Common          : array[0..509] of byte;               //1304-1813 : 510 bytes
      Karma_Module          : array[0..3] of TKarma_Module;        //1814-2557 : 744 bytes each  Total span 1814 - 4789 = 2976 bytes total
      Common_Params         : array[0..11] of byte;                //4790-4801 = 12 bytes
      Timbre_Group          : array[1..16] of TTimbre_Params;   )  // 4802 -4989 = 188 bytes each,  16 Timbres, 4802-7809 = 3008 bytes total for all
  end;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T23:14:01+00:00Added an answer on May 31, 2026 at 11:14 pm

    First of all, there needs to be space for the directmode field. If you really want the record to have size 7810 bytes then you should remove that field. The other byte will be due to internal alignment and padding of the false part of the variant record. I can’t yet quite work out where it comes from. No matter, you simply want to use a packed record to avoid any padding bytes.

    TKro_Combi = packed record  
    case boolean of
    true : (
      data : array[0..7809] of byte
           );
    false : (
      Combi_Name            : array[0..23] of char;                //24
      Gap1                  : array[0..63] of byte;                // 24-87 (64)
      Ins_Effect_Group      : array[1..12] of TIns_Effect_Params;  //74 each,   (Ins_Effect_Data=9 bytes)  74*12 = 888
      Mast_Effect_Params    : array[0..229] of byte;               // 976-1205 : 230 bytes
      Vect_Aud__Drum_Params : array[0..97] of byte;                //1206-1303  : 98 bytes
      Karma_Common          : array[0..509] of byte;               //1304-1813 : 510 bytes
      Karma_Module          : array[0..3] of TKarma_Module;        //1814-2557 : 744 bytes each  Total span 1814 - 4789 = 2976 bytes total
      Common_Params         : array[0..11] of byte;                //4790-4801 = 12 bytes
      Timbre_Group          : array[1..16] of TTimbre_Params;   )  // 4802 -4989 = 188 bytes each,  16 Timbres, 4802-7809 = 3008 bytes total for all
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
Does anyone know how can I replace this 2 symbol below from the string
I want to construct a data frame in an Rcpp function, but when I
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I have some data like this: 1 2 3 4 5 9 2 6
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.