Jump to content
Sign in to follow this  
Guest grb

"number" vs "feet"

Recommended Posts

Guest scoman81

I have an L: variable that I'm using as "number" everywhere, and when I display it as "feet" - I get some scaled up number instead (although as a "number" it displays as expected).What's the correlation between number and feet?Just for more info - I'm setting an L: value from the gauage as a number, and trying to compare it to (A:Indicated Altitude).Thanks for any help,Dave

Share this post


Link to post
Share on other sites

>> What's the correlation between number and feet?In general, that's impossible to answer.With "number", you just get the value of the internal unit-of-measure for that variable. Which is unspecified, and may even depend on FS settings (like "metric" or "US" )So when you read out an FS variable, always specify the Units if you know them (so FS does the conversion).And for L:vars, use "number", "bool", or "enum".In your example, use:(A:Indicated Altitude,feet)and store it as (>L:****, number)for later comparison.Rob

Share this post


Link to post
Share on other sites
Guest grb

I am confused on XML syntax to a large degree. I often see lines of code that show code that does not appear to have anything to do with a test or if statement type relational operator,e.g. greater then, less then, equal to, etc..What exactly does the "gt;" mean in the following:(>L:****, number)I always thought the &gt means greater then and is used in if statements for testing variables. BUT it appears as I view XML code that &gt is used for more then just a comparision operator.Is this true? And if so could someone enlighten me as to when someone would want to use &gt for something other then a comparision operator. Clearly, as I view the SDK XML part of the guide it shows only the comparision operator usuage. ThanksGeorge

Share this post


Link to post
Share on other sites
Guest scoman81

The greater than sign is used as an assignment operator. As an example:(L:MyVar,number) 10 + (>L:MyVar,number)Says "push the current value of MyVar, push 10, execute an addition operation on the top two stack values, and assign the resulting value to MyVar"HTH,Dave

Share this post


Link to post
Share on other sites
Guest grb

Dave,Thanks a lot for the answer. Now it makes sense. I can see the "duality" usuage depending on what particular type code string one is writting, e.g. assignment verse within a if statement. Or at least it appears to now be understood. Guess I will experiment a bit, to further enforce the difference in usuage.George

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