variables

Associated commands:

/set
set the value of a global variable
/let
set the value of a local variable
/setenv
set the value of an environment variable
/unset
unset a variable
/export
move an global variable to the environment

A TinyFugue variable has a name and a value. Names are case sensitive, and should start with a letter and contain only letters, numbers, and underscores. A value can be any string, but special flag and numeric variables will automatically convert their value to an integer.

Variables may either be local, global, or exported. Global variables are imported from the environment when tf starts, or defined with /set; they are visible to all tf commands. Local variables are created with /let or assignment expressions, and only exist in the scope in which they were created. Exported variables are global variables which are also visible to subshells, so they can be used by commands /sh, the '!' option of /quote, and file uncompression.

The value of a variable can be obtained using a '%' substitution (see "substitution"), or by simply using its name in an expression (see "expressions").

See "special variables" for a list of special variables.


Back to index
Back to tf home page
Copyright © 1995, 1996, 1997 Ken Keys