Site Tools


unshift_command
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


unshift_command [2006/08/29 16:08] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +======Synopsis:======
 +__unshift__ <variable name> <word> \\
 +__shift__   <variable name>
 +
 +======Description:======
 +__UNSHIFT__ prepends the given word (or words) to the given variable,
 +padded with a single space.  The variable name itself may not contain
 +a leading '$'; the command uses the variable itself, not the expanded
 +contents.  If the variable does not exist, it is created containing
 +the given word(s) (just as if [[ASSIGN]] were used).
 +
 +======Aliases:======
 +__SHIFT__ is the exact opposite of __UNSHIFT__, in that it chops off the first
 +word in the variable.  If there is only one word in the variable, the variable
 +is deleted.  Both __UNSHIFT__ and __SHIFT__ are functionally equivalent to the
 +$[[unshift function|unshift]]() and $[[shift function|shift]]() functions,
 +respectively.
  
unshift_command.txt · Last modified: 2006/08/29 16:08 by 127.0.0.1