1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Data type "BOOL" in SimConnectSDK is 4 bytes of size?

Discussion in 'SimConnect' started by Manuel Ambulo, 20/10/06.

  1. Manuel Ambulo

    Manuel Ambulo

    Joined:
    29/9/06
    Messages:
    162
    Country:
    panama
    Hi,

    This maybe is a FOOL or basic question that i think i shouldnt ask, but just to be sure or confirm.

    In the SimConnect SDK, when a variable is type "BOOL" (In the SimVariables list) means it is an "integer" (4 bytes of size), or a "char" (1 byte of size)..of size?...:confused: ...as you know it will return a value of TRUE = 1 or FALSE = 0...

    Im asking because i want to be sure if a "BOOL" is "integer" (4 bytes)..or "char" (1 byte).

    In C, there is a data type of "BOOL" which is an "integer" (4 bytes of size)...but in C++, there is another data type which is "bool" (not the same as "BOOL"), which is actually (1 byte of size)....

    Also i want to ask, data types, BCO16 and BCD32 are like these?:

    BCO16 = unsigned short?
    BCD32 = unsigned long?

    (Correct me if....im wrong)..

    Thanks,

    Manuel Ambulo

    (Sorry for these FOOL questions, but i feel i had to ask them.. to be sure or to confirm, if im wrong then correct me, please) :eek:
    Last edited: 20/10/06
  2. Pete Dowson

    Pete Dowson

    Joined:
    25/9/06
    Messages:
    315
    Country:
    unitedkingdom
    Types like BOOL are #defined. If you are using Visual Studio, all you need to do is right click on them and select "go to definition" and it will leap to the header where it is defined -- you would see it is a 32-bit value.

    Depends on which version and which compiler. In Microsoft C++, the C++ predefined type "bool" was also defined as a 32-bit int before version 5.0. I expect this is why library based interfaces are careful to used independently #defined types.

    Yes, probably. I've not right-clicked on them and selected "go to definition" to look (I recommend you do, just to be sure), but certainly all FS-defined types in the past have used that type of naming, with the number of bits at the end. as in "FLOAT32" and "FLOAT64", "UINT16, "UINT32" etc.

    The Panel SDK gauges header file has good entertainment value in this area, it'll keep you amused for hours! ;-)

    Best regards

    Pete
  3. Manuel Ambulo

    Manuel Ambulo

    Joined:
    29/9/06
    Messages:
    162
    Country:
    panama
    THANKS A LOT!, Pete, those questions or doubts kept me thinking for a while... i openned the GAUGES.h file (in the FSX SDK)....after reading your reply... and saw most of the data types described in the SimConnect SDK inside of it with the "#define" statement... :)

    Thanks, a LOT,

    Best Regards,

    Manuel Ambulo

Share This Page