local

Synopsis:
local [ [-] <variable name> [,<variable name>] [<value>] ]

Description:
local creates "local" variables. Local variables are the same as assign variables, except they're primarily for inside one specific alias. Local variables cannot be removed. There are several reasons for this, which are mostly advantages for scripts. A local variable is specific to the alias it was defined in, causing less confusion with multiple variables in multiple aliases. They are less cpu-intensive, making them optimal for recursive functions like for. Arrays may also be defined with local.

Examples:
To give the local variable $blah a value of "this is a test":
local blah this is a test

To give both $blah and $foo a value:
local blah,foo local vars are neat

See Also:
Expressions
Special_Vars
alias
assign
eval
set input_aliases

 

Back

Hosted by www.Geocities.ws

1