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
Help AVSIM continue to serve you!
Please donate today!

>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)???

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