Produced by IDL 7.1.1
User Documentation

./guide
emptystack.pro

Last modification date:
Wed Sep 28 13:27:08 2016

emptystack

procedure emptystack, [/reset], [/shrink]

Clear the stack.

Normally this simply sets !g.acount to 0, and this is all that is needed for typical use of the stack. Optionally, the procedure can also reset the stack array to zeros and it can shrink the size of the stack to it's initial size of 5120 elements. That could be useful if the stack grew to an unexpectedly large size and you want to release the memory. The stack will grow as needed when addstack and appendstack are called. Only the !g.acount elements are ever used.

Examples
    addstack,1,100
    emptystack
    addstack,1,100000
    emptystack,/shrink   ; reduce it to 5120 elements
 
Version
$Id$

Keywords
reset
in, optional
boolean
When set, the values will be reset to 0. This is not required for typical use of the stack.
shrink
in, optional
boolean
When set, the size of the array will be reset to its initial size of 5120 elements. This is to reverse any automatic expansion that may have occurred during previous stack operations.


Produced by IDLdoc 1.6 on Wed Sep 28 13:27:33 2016