nstcl  >  Documentation  >  nstcl-misc  >  swap

Tcl Powered!

swap

NAME

swap — Swap the value of two variables

SYNOPSIS

package require nstcl-misc ?1.0?
package require nstcl ?1.0?

::nstcl::swap x y

DESCRIPTION

This command will swap the value of two variables (or the contents of two arrays). Naturally it is an error to attempt to swap the value of undefined variables, or to attempt to swap an array and a string.

KEYWORDS

misc, nstcl