Name

ref — Returns a reference to the variable.

Synopsis

ref varname

Description

The ref command is the equivalent of the & syntax - it returns a reference to the Hecl 'thing' that the variable varname points to.

Example

set foo 1
set bar [ref foo]
incr &bar 1
puts $foo
	  

Produces:

2