# $EPIC: pop_function.txt,v 1.6 2007/02/17 18:41:08 jnelson Exp $ ======Synopsis:====== $__pop__() ======Technical:====== * If no arguments are provided, the empty string is returned. * If the argument consists of only one word, it is taken as . * If more than one arguments are provided, they are taken as . * If a is provided, the return value is the last word in . DOUBLE QUOTED WORDS ARE NOT SUPPORTED. (This may change in the future.) * If is provided, is changed by removing the last word, and the return value is the word that was removed. DOUBLE QUOTED WORDS ARE NOT SUPPORTED. (This may change in the future.) * If contains only one word, the entire contents of $ are returned and the variable is removed/unset. * This function does not support double-quoted words. ======Practical:====== Pop removes the last word from a word list, or from a word list stored in a variable. It reverses the action of $[[push function|push]](). If you are implementing a FIFO, you can [[unshift function|unshift]] words onto the front of a variable and pop them off the back. ======Returns:====== The last word of or of $. ======Examples:====== $pop(one two three) returns "three" assign booya one two three four $pop(booya) returns "four", $booya is now "one two three". ======History:====== This function first appeared in "+7" (post-ircII, pre-EPIC)