by TheMouse (3 Submissions)
Category: String Manipulation
Compatability: Visual Basic 5.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating:
(5 Votes)
This class was created for the main purposes of having a controlled "stack" (like the stack, or memory heap in a computer). It will let you push items onto the stack, pop them off, and retrieve the number of items on the stack, and more. I'm pretty much a beginner here, so tell me what you think.
Inputs
Just declare a Stack object, and you can Push and Pop values to/from the stack.
Assumes
Remember to use "set x = new Stack" and "set x = nothing" in the appropriate places.
Side Effects
None that I'm aware of; If you do not set the ErrUnderrun flag, VB will throw an exception if you pop an item from the stack when it's empty.