# /shift

Usage:

/SHIFT [n]

Shifts the positional parameters left by n. That is, the positional parameters %(n+1) ... %# are renamed to %1 ... %(#-n). If n is omitted, 1 is assumed.

/shift is useful only during macro expansion.

Example:

      /def worlds = /while ({#}) /world %1%; /shift%; /done

Then, the command "`/worlds foo bar baz`" would execute the commands "`/world foo`", "`/world bar`", and "`/world baz`".

See: variables, evaluation, list commands

Back to index
Back to tf home page

Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004 Ken Keys