January 29, 200521 yr 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
January 30, 200521 yr >> 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
January 30, 200521 yr 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 > means greater then and is used in if statements for testing variables. BUT it appears as I view XML code that > 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 > 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
January 30, 200521 yr 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
January 31, 200521 yr 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
Create an account or sign in to comment