The tag <stack.push> allows to place an object in the execution stack of the program. The stack can be indicated via the attribute name
or passing it as argument.
1 stack.push
<stack.push name='name'>
<stack /> ?
</stack.push>
Attributes | |||||
---|---|---|---|---|---|
Name | Type | Required | Default | Description | |
Aname | string | Stack name. |
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Estack | Stack |
Returns | |
---|---|
Type | Description |
Object | The object placed in the stack. |
Example
Create a stack and assign to it values through the push function.
Copy
<xsql-script name='push_test'> <body> <!-- 1.- Stack created without values and with name --> <stack name='stack1' /> <set name='a'><number>10</number></set> <set name='b'><string>hello</string></set> <!-- Assignment of values, indicating the stack by its name --> <stack.push name='stack1'><a/></stack.push> <stack.push name='stack1'><b/></stack.push> <!-- Assignment of values, indicating the stack as argument --> <stack.push><stack1/><a/></stack.push> <stack.push><stack1/<b/></stack.push> </body> </xsql-script>