XML: Stack Example: Difference between revisions
No edit summary |
|||
| (14 intermediate revisions by the same user not shown) | |||
| Line 7: | Line 7: | ||
[[File:Stack Example 0.png]] | [[File:Stack Example 0.png]] | ||
| Line 13: | Line 14: | ||
[[File:Stack Example.png]] | [[File:Stack Example.png]] | ||
'''MAXIMUM STACK DEPTH''' | '''MAXIMUM STACK DEPTH''' | ||
According to | According to [http://blogs.technet.com/b/engauged/archive/2005/11/08/413947.aspx this old blog] | ||
the maximum stack depth is 30. When the stack is full, any new value pushed onto the top causes the bottom value to be removed and discarded. | the maximum stack depth is 30. When the stack is full, any new value pushed onto the top causes the bottom value to be removed and discarded. | ||
| Line 23: | Line 26: | ||
'''CLEARING THE STACK''' | '''CLEARING THE STACK''' | ||
The stack is cleared at the beginning of each gauge cycle, or by applying the Clear Stack operator, "c". Of course, also during a panel Load/Reload. | The stack is cleared at the beginning of each gauge cycle, or by applying the Clear Stack XML operator, "c". Of course, also during a panel Load/Reload. | ||
| Line 31: | Line 34: | ||
Acknowledgement: Thanks to Tom Aguilo for information on stack structure. | '''STACK GAUGE''' | ||
Attached to this [http://fsdeveloper.com/forum/threads/colored-trim-position-in-percent-text-string.437125/#post-741953 FSDeveloper thread] is a simple XML gauge that can be used to view the stack at any point in an XML script. To understand what the lesser known XML Operators actually do or to Q/C complicated script logic, it is sometimes useful to see the stack, step by step. | |||
''Acknowledgement: Thanks to Tom Aguilo for information on stack structure.'' | |||
- rpmc | [[- rpmc]] | ||
[[Category:Aircraft Design]] | [[Category:Aircraft Design]] | ||
[[Category:Panel and Gauge Design]] | [[Category:Panel and Gauge Design]] | ||
Latest revision as of 01:45, 25 April 2016
Stack examples
EXAMPLE 1
EXAMPLE 2
MAXIMUM STACK DEPTH
According to this old blog the maximum stack depth is 30. When the stack is full, any new value pushed onto the top causes the bottom value to be removed and discarded.
CLEARING THE STACK
The stack is cleared at the beginning of each gauge cycle, or by applying the Clear Stack XML operator, "c". Of course, also during a panel Load/Reload.
DIFFERENT STACKS
The stack is shared between <Update> and all of the <Element> set. As well, each <Area>, <On Event> and <On Key> structures hold their own stacks.
STACK GAUGE
Attached to this FSDeveloper thread is a simple XML gauge that can be used to view the stack at any point in an XML script. To understand what the lesser known XML Operators actually do or to Q/C complicated script logic, it is sometimes useful to see the stack, step by step.
Acknowledgement: Thanks to Tom Aguilo for information on stack structure.

