Menu

SyntaxSet

Brad Lanam

Wiki Home
Syntax

Syntax: set

Variable names may contain any valid UTF-8 character. There are no validity checks to exclude unusual UTF-8 characters.

Variable names may not contain spaces.

set [temporary] variable_name <value>;

value may be an integer, quoted string, single quoted string, a variable, an expression, or a list.

The temporary option puts the variable into a temporary namespace. These variables can be accessed as usual, and once a variable is in the temporary namespace, it can be set as usual.


See Syntax: Variables

set variable_name <value> { context <context>; }

This form of set is used internally by the cache to set the context. context may be one of check, env, flag, mkc, temp, disable, enable.

Examples
set a 1;
set b 'hello';
set c 'world';
set d "${b} ${c}";
set h $ENV{HOME};
print ${d};

set temporary tt 14;
set tt 15;            # will change the temporary variable
Attributes
  • context
References

Syntax: Variables

Wiki Home
Syntax


Related

Wiki: Home
Wiki: Syntax
Wiki: SyntaxVariable