XML: Stack Example: Difference between revisions

From FSDeveloper Wiki
Jump to navigationJump to search
Line 34: Line 34:
'''STACK GAUGE'''
'''STACK GAUGE'''


Attached to this FSDeveloper thread [[http://fsdeveloper.com/forum/threads/colored-trim-position-in-percent-text-string.437125/#post-741953]] is a simple XML gauge that can be used to view the stack at any point in the XML script.  To understand what the lesser known XML Operators actually do, it is sometimes useful to see how they influence the stack.
Attached to this FSDeveloper thread [http://fsdeveloper.com/forum/threads/colored-trim-position-in-percent-text-string.437125/#post-741953] is a simple XML gauge that can be used to view the stack at any point in the XML script.  To understand what the lesser known XML Operators actually do, it is sometimes useful to see how they influence the stack.





Revision as of 23:23, 24 April 2016

Stack examples

EXAMPLE 1



EXAMPLE 2



MAXIMUM STACK DEPTH

According to this old blog [1] 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 [2] is a simple XML gauge that can be used to view the stack at any point in the XML script. To understand what the lesser known XML Operators actually do, it is sometimes useful to see how they influence the stack.


Acknowledgement: Thanks to Tom Aguilo for information on stack structure.

- rpmc