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

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

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

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

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