all tasks
This commit is contained in:
parent
b83f433714
commit
68f8f3e56b
14735 changed files with 178959 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