Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
21
Task/Stack/VBA/stack-2.vba
Normal file
21
Task/Stack/VBA/stack-2.vba
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
'stack test
|
||||
Public Sub stacktest()
|
||||
Dim aStack As New Stack
|
||||
With aStack
|
||||
'push and pop some value
|
||||
.Push 45
|
||||
.Push 123.45
|
||||
.Pop
|
||||
.Push "a string"
|
||||
.Push "another string"
|
||||
.Pop
|
||||
.Push Cos(0.75)
|
||||
Debug.Print "stack size is "; .Size
|
||||
While Not .IsEmpty
|
||||
Debug.Print "pop: "; .Pop
|
||||
Wend
|
||||
Debug.Print "stack size is "; .Size
|
||||
'try to continue popping
|
||||
.Pop
|
||||
End With
|
||||
End Sub
|
||||
Loading…
Add table
Add a link
Reference in a new issue