Tcl internal variables

简介: Tcl internal variables eryar@163.com 在Tcl中内置了一些变量,并赋予了一定的功能。内置变量列表如下: 变量名称 功能描述 argc 指命令行参数的个数。

Tcl internal variables

eryar@163.com

在Tcl中内置了一些变量,并赋予了一定的功能。内置变量列表如下:

变量名称

功能描述

argc

指命令行参数的个数。

argv 

指包含命令行参数的列表。 

argv0  

是指被解释的文件或由调用脚本的名称的文件名。

env  

用于表示是环境变量数组元素。

errorCode 

为最后的Tcl错误的错误代码。

errorInfo 

为最后Tcl错误的堆栈跟踪信息。

tcl_interactive 

分别将其设置为1和0交互和非交互模式之间切换。

tcl_library 

用于设置的标准Tcl库的位置。 

tcl_pkgPath 

提供一般都安装包的目录列表。

tcl_patchLevel 

指的是Tcl解释目前的补丁级别。 

tcl_platform  

用于表示使用对象,包括byteOrder, machine, osVersion平台和操作系统数组元素。

tcl_precision  

指的是精度,即位数转换为浮点数时,字符串保留。默认值是12。

tcl_prompt1 

指的是主提示符。

tcl_prompt2 

指无效的命令二次提示。

tcl_rcFileName 

为用户提供了具体的启动文件。 

tcl_traceCompile 

用于控制字节码编译的跟踪。用0表示无输出,1为概要和2为详细。

tcl_traceExec 

用于控制执行的字节码的跟踪。用0表示无输出,1为概要和2为详细。

tcl_version  

返回Tcl解释器的最新版本。

使用内置变量的例子,获取Tcl版本信息,获取环境变量,更改Tcl提示符:
#  tcl version 
puts  $tcl_version  

#  tcl env variable 
puts  $env (username) 

puts 
$env (path) 

#  tcl prompt 
set tcl_prompt1 {puts  - nonewline  " command> "

 

wps_clip_image-30168

目录
相关文章
|
Java Maven
The JAVA_HOME environment variable is not defined correctly 解决方法
解决措施:去设置里把JAVA8卸载掉,注意右击卸载,不要直接删根目录,然后把环境变量JAVA8_HOME也删掉,JAVA8 再见
624 0
The JAVA_HOME environment variable is not defined correctly 解决方法
如何解决 conda install 库时报错:The environment is inconsistent, please check the package plan carefully
如何解决 conda install 库时报错:The environment is inconsistent, please check the package plan carefully
如何解决 conda install 库时报错:The environment is inconsistent, please check the package plan carefully
|
前端开发 Java
java:How to use variable parameter? (easy to understand)
It's the first time to write a blog in English for me. (About variable parameter)
70 0
java:How to use variable parameter? (easy to understand)
codeblocks中出现#error This file requires compiler and library support for the错误时的解决方案
codeblocks中出现#error This file requires compiler and library support for the错误时的解决方案
456 0
codeblocks中出现#error This file requires compiler and library support for the错误时的解决方案
|
关系型数据库 MySQL Java
Server returns invalid timezone. Go to 'Advanced' tab and set 'serverTimezone' property manually
Server returns invalid timezone. Go to 'Advanced' tab and set 'serverTimezone' property manually
4180 1
Server returns invalid timezone. Go to 'Advanced' tab and set 'serverTimezone' property manually
|
Python
arserWarning: Falling back to the ‘python‘ engine because the ‘c‘ engine does not support regex sepa
arserWarning: Falling back to the ‘python‘ engine because the ‘c‘ engine does not support regex sepa
107 0
arserWarning: Falling back to the ‘python‘ engine because the ‘c‘ engine does not support regex sepa
|
Java Shell PHP
Guidelines for Function Compute Development - Use Fun Local for Local Running and Debugging
Preface The following key concepts are involved in this document: Function Compute: an event-driven service that allows you to focus on writing and .
1738 0