Tcl -- unset

来源:互联网 发布:智能语音翻译软件 编辑:程序博客网 时间:2024/06/06 01:17

1. Unset - Delete variables

    unset用来删除变量

2. 语法

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

3. 说明

    This command removes one or more variables. 

    这个命令用来删除一个或者多个变量。

    Each name is a variable name, specified in any of the ways acceptable to the set command.

    每一个名字都是变量名,通常是用set指定的。

    If a name refers to an element of an array then that element is removed without affecting the rest of the array.

   如果是一个数组元素,则只会删除该数组元素,不会删除其他的数组元素。

    If a name consists of an array name with no parenthesized index, thenthe entire array is deleted.

   但是如果是数组名,不带索引(下标),会删除整个数组。

    The unset command returns an empty stringas result. 返回空字符串。

    An error can occur when the named variable does not exist. 如果变量不存在会报错。

4. 举例

  

   

0 0
原创粉丝点击