Chapter 11 |
|
Home Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9 Chapter 10 Chapter 11 Chapter 12 Chapter 13 Chapter 14 Chapter 15 Table of Contents |
The StackA stack is a list of items for which access is restricted to the top item of the list. you can create a stack by using an array and a variable that acts as a pointer to the top element of the stack. Stacks are accessed by two subprograms: the Pop function pops a value from the top of the stack, and the Push subroutine puts a value onto the top of the stack. each procedure leaves the stack pointer pointing to the next open space of the stack. Infix notation puts the operator between the operands (a+b). Postfix notation puts the operator after the operands (a b +). Postfix notation is particularly well suited for computers because its rule for order of operations is to process expressions in order left to right. You can make labels, as well as several other screen controls, into control arrays by giving each the same name. The labels are accessed with the common name and a numerical index. The Form_Load procedure is used for initializing varialbes and taking care of other housekeeping chores. This procedure executes whenever a form is loaded into memory. The Select Case statement can use a range of values to choose a branch using the following syntax: Case low item To high item |