Jump to content
Sign in to follow this  
rcbarend

TIP: XML events and the stack

Recommended Posts

Yet ANOTHER bug in a gauge of mine solved ..LOLIf you program XML gauges, and rely on stack operations (like the "d" and "r" commands), note that ALL events take a value from the stack, even events that logically don't require a value (and simply read but ignore the read value). Which might not be what you expect; that is: I didn't :-)Example:(>K:TOGGLE_TAXI_LIGHTS)by itself works perfectly and gives the same result as 1 (>K:TOGGLE_TAXI_LIGHTS)or100 (>K:TOGGLE_TAXI_LIGHTS)However,3 (>K:TOGGLE_TAXI_LIGHTS) (>G:Var1)DOESNOT set Var1 to 3, but to the previous value on the stack.3 100 (>K:TOGGLE_TAXI_LIGHTS) (>G:Var1)DOES set Var1 to 3.Cheers, Rob

Share this post


Link to post
Share on other sites

>3 100 (>K:TOGGLE_TAXI_LIGHTS) (>G:Var1)>DOES set Var1 to 3.Er, why not simply put the value for G:Var1 in front of the actual call, e.g.:(>K:TOGGLE_TAXI_LIGHTS) 3 (>G:Var1)???


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

Hi Bill,Yes, of course ...But it was just an example to illustrate my point :-)Rob

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...