Jump to content

Sign in to follow this  
ChrisK

Reading a P variable in C/C++ code

Recommended Posts

Do you know if reading a P variable from a C/C++ code can be done? If yes, how?For example, if I want to read the TIME ZONE OFFSET variable, I can do it in XML:(P:TIME ZONE OFFSET, minute)But can I do the same from C/C++ ?Thanks !!Eric


<a href='http://emarciano.free.fr'><span rel='lightbox'><img src='http://emarciano.free.fr/images/Signature5.jpg' alt='Posted Image' class='bbc_img' /></span></a>

Share this post


Link to post
Share on other sites

Eric,This from GAUGES.H BOOL (FSAPI *execute_calculator_code) (PCSTRINGZ code, FLOAT64* fvalue, SINT32* ivalue, PCSTRINGZ* svalue);You can use it to evaluate pretty much any XML expression. I have used it to return a floating point A: or L: variable. No reason why it shouldn't give you one of the P: values.Doug

Share this post


Link to post
Share on other sites

I didn't have time to test, but if I understand this correctly, it means the "code" string should contain "(P:TIME ZONE OFFSET, minute)" and the value should be returned in the fvalue or ivalue.Is that right?Thanks for the info !!Eric


<a href='http://emarciano.free.fr'><span rel='lightbox'><img src='http://emarciano.free.fr/images/Signature5.jpg' alt='Posted Image' class='bbc_img' /></span></a>

Share this post


Link to post
Share on other sites

FLOAT64 time_zone_offset;execute_calculator_code("(P:TIME ZONE OFFSET, minute)",&time_zone_offset,NULL,NULL);This should work fine.Chris


Chris Koegler

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
  • Donation Goals

    AVSIM's 2020 Fundraising Goal

    Donate to our annual general fundraising goal. This donation keeps our doors open and providing you service 24 x 7 x 365. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. We reset this goal every new year for the following year's goal.


    22%
    $5,540.00 of $25,000.00 Donate Now
×
×
  • Create New...