SoFunction
Updated on 2025-04-12

Summary of the operation methods of Yi Language nodes and stacks

. Version 2
.Support library EDataStructure

.Assembly Window Assembly 1, , , Easy Language Node and Stack Operation

.Subprogram _button 1_ is clicked
.Local variable stack, stack
.Local variable yyy, node
.Local variable zzz, node
.Local variable ttt, node
.Local variables Get the node information of the stack 1, text type
.Local variables Get the node information of the stack 2, date and time type

yyy.Add attributes ("name", "Zhang San")
yyy.Add attribute ("Birthday", [February 7, 1976])

zzz.Add attributes ("name", "Li Si")
zzz.Add attribute ("Birthday", [December 3, 1976])

Stack.Press (yyy)
Stack.Press (zzz)
Information box ("Total in the stack:" + to text (stack. Take size ()) + "nodes", 0, )

Stack.Pop (ttt)
ttt. Get text value ("name", get node information of the stack 1)
Information box (get the node information of the stack 1, 0, )
ttt.Get date value ("birthday", get node information of the stack 2)
Information box (get the node information of the stack 2, 0, )
Information box ("There are still left in the stack:" + to text (stack. Take size ()), 0, )


Stack.Pop (ttt)
ttt. Get text value ("name", get node information of the stack 1)
Information box (get the node information of the stack 1, 0, )
ttt.Get date value ("birthday", get node information of the stack 2)
Information box (get the node information of the stack 2, 0, )
Information box ("There are still left in the stack:" + to text (stack. Take size ()), 0, )