Jump to content
Sign in to follow this  
ark

Novice XML Question

Recommended Posts

The code line 

 

<GaugeString>%((A:Plane heading degrees gyro,degrees))%!03d!</GaugeString>

 

  is used to generate a heading value that is to be displayed on an a/c PFD.

 

I wanted to reduce the value displayed by one degree and thought the following would work, but it doesn't:

 

<GaugeString>%((A:Plane heading degrees gyro,degrees) 1-)%!03d!</GaugeString> .

 

My understanding is the !03d! code section formats the result to 3 digits, and I thought my addition in red would reduce the heading value by 1 before that took place. Clearly I don't understand something basic here. Would appreciate any advice.

 

Would also appreciate recommendations for a good online XML tutorial.

 

Thx,

Al

 

Share this post


Link to post
Share on other sites

Bert,

That solved the problem. I would have sworn I had tried that first, but apparently not.

Thanks!

Al

Share this post


Link to post
Share on other sites

I think you could also use -- (ie. decrement) instead of 1 - 


Barry Friedman

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.
×
×
  • Create New...