An implementation of a stack (last in, first out) data collection.
Usage:
Usage:
B4X:
Private Sub AppStart
Serial1.Initialize(115200)
Log("AppStart")
Stack.Push("Item 1")
Stack.Push("Item 222")
Stack.Push("Item 3333")
Stack.Push("Item 44")
Stack.Push("Item 555555")
Stack.Pop
Stack.Push("Item 612312")
Stack.Push("Item 77777777777")
Stack.Push("Item 88")
Stack.Push("Item 99")
Do While Stack.Size > 0
Log(Stack.LastItem)
Stack.Pop
Loop
Log("Size: ", Stack.Size)
End Sub