## dequeue

### Syntax:

dequeue (*thisStack*);

### Purpose:

Removes the first element from a stack. If there were previously **n** elements in the stack (numbered **0** to **n-1**) there will now be **n-1** elements in the stack (numbered **0** to **n-2**) with *thisStack[0]* now containing the old value of *thisStack[1]*, *thisStack[1]* now containing the old value of *thisStack[2]* and so on. Calling this function is equivalent to calling the popFromStack command.

### Return value:

The command returns the value which was removed; the old value of *thisStack[0]*.

### See also:

The Multi-Purpose Stack / Array / Queue Type

enqueue

newStack

pushToStack

SLUDGE and this SLUDGE documentation are copyright Hungry Software and contributors 2000-2012