Microsoft Small Basic

Program Listing: LXW659
Stack.PushValue("first stack", "first stack, 1")
Stack.PushValue("first stack", "first stack, 2")
Stack.PushValue("first stack", "first stack, 3")
Stack.PushValue("second stack", "second stack, 1")
Stack.PushValue("second stack", "second stack, 2")
Stack.PushValue("second stack", "second stack, 3")
Stack.PushValue("second stack", "second stack, 4")
TextWindow.WriteLine("First stack has " + Stack.GetCount("first stack") + " items.")
TextWindow.WriteLine("Second stack has " + Stack.GetCount("second stack") + " items.")
TextWindow.WriteLine("Top item on first stack is: " + Stack.PopValue("first stack") + ".")
TextWindow.WriteLine("Top item on second stack is: " + Stack.PopValue("second stack") + ".")
TextWindow.WriteLine("After popping, top item on first stack is: " + Stack.PopValue("first stack") + ".")
TextWindow.WriteLine("After popping, top item on second stack is: " + Stack.PopValue("second stack") + ".")