POP operation
.
POP(STACK,TOP, ITEM)
This procedure deletes the top element of STACK and assigns it to the variable ITEM.
1. [Stack han an item to be removed?]
if TOP =0, then: print: UNDERFLOW, and Return.
2. set ITEM := STACK[TOP]. [Assigns TOP element to ITEM.]
3. set TOP := TOP -1.[Decreases TOP by 1.]
4 Return.