MANY cobwebs here, but I recall something with regards to the "S0" commands.
They basically "store" the information, if I recall correctly. You can have up to 10 commands or data instructions (S0 - S9) which can then be "recalled" by using the "L0" script.
The "S" is for "store" while the "L" is for "Load" in the case of these xml gauges. Just remember that in many cases it's written as "s0" and "l0" where the letters are lower-case.
Let's say you run a multiplier like 2 x 4 = 8 in your script. You could then write the s0 command after it to store the answer. Then, when you needed the answer in a further line down the road, you'd place l0 at the beginning of that line where you needed the answer to be used. If you needed it to be used further down the line, then you would just place the l0 further down the equation.
My syntax probably stinks, but here goes:
* 2 4 s0
That should "store" the number 8 in your xml. When you're ready to use the answer you could write:
/ 16 l0
which would give you an answer of "2" in the end.
At least I
think that's the way to do it, anyway.
The "store" and "load" are well suited for the "logic" stuff since they can help you compare numbers/values by calling up the answer to a previous equation. Nice for performance, if you have failures, navigation information, etc.
As for the "logic" statements, well, that's another story. I did some work with folks to put out a LORAN gauge for FS9 a while back, but my work was mostly the manual and the graphics. The gist I remember for the "if/else" statements and lines is that "if" is followed by what you want to test (i.e. whether a station is in range of the aircraft). The "else" is what you would like if the value isn't what you want in the "if" statement (i.e. if the aircraft is within 500 nm then the station is in range, else it is not and you don't have a signal).
If I remember correctly, you can "store" the answer of one if/else statement and then "load" it down the line with another if/else statement to have a sort of "compound" statement. Just can't really remember the
how.
Again, I'm VERY, VERY rusty on this since it's been a while. With stuff going on at home I barely have time to contribute any more, but thought I'd try to help with what little I remember.
Like Allen said, you're better off trying to see if FSDeveloper folks can help on this since this is right down their alley.
Good luck!
Jorge
Miami, FL