pop_function
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | pop_function [2007/02/17 18:41] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | # $EPIC: pop_function.txt, | ||
+ | ======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 <word list>. | ||
+ | * If a <word list> is provided, the return value is the last word in <word list> | ||
+ | * If < | ||
+ | * If < | ||
+ | * 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. | ||
+ | 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 <word list> or of $< | ||
+ | |||
+ | ======Examples: | ||
+ | $pop(one two three) | ||
+ | assign booya one two three four | ||
+ | $pop(booya) | ||
+ | $booya is now "one two three" | ||
+ | |||
+ | ======History: | ||
+ | This function first appeared in " | ||
pop_function.txt · Last modified: 2007/02/17 18:41 by 127.0.0.1