Skip to content

unset

Delete one or more variables.

Syntax

tcl
unset ?-nocomplain? ?--? ?name ...?

Parameters

  • -nocomplain: Suppress errors if variable doesn't exist
  • --: Marks end of options (use if variable name starts with dash)
  • name: One or more variable names to delete

Description

Removes the specified variables from the current scope. By default, raises an error if a variable doesn't exist. Use -nocomplain to silently ignore missing variables.

Examples

Basic unset

Output

Using -nocomplain

Output

Unsetting multiple variables

Output

See Also