TCL特殊变量

本文介绍了TCL语言中的一些特殊变量,如tcl_version和tcl_library,它们在TCL环境中具有特定的作用。

 

Sr.No.Special Variable & Description
1

argc

Refers to a number of command-line arguments.

2

argv

Refers to the list containing the command-line arguments.

3

argv0

Refers to the file name of the file being interpreted or the name by which we invoke the script.

4

env

Used for representing the array of elements that are environmental variables.

5

errorCode

Provides the error code for last Tcl error.

6

errorInfo

Provides the stack trace for last Tcl error.

7

tcl_interactive

Used to switch between interactive and non-interactive modes by setting this to 1 and 0 respectively.

8

tcl_library

Used for setting the location of standard Tcl libraries.

9

tcl_pkgPath

Provides the list of directories where packages are generally installed.

10

tcl_patchLevel

Refers to the current patch level of the Tcl interpreter.

11

tcl_platform

Used for representing the array of elements with objects including byteOrder, machine, osVersion, platform, and os.

12

tcl_precision

Refers to the precision i.e. number of digits to retain when converting to floating-point numbers to strings. The default value is 12.

13

tcl_prompt1

Refers to the primary prompt.

14

tcl_prompt2

Refers to the secondary prompt with invalid commands.

15

tcl_rcFileName

Provides the user specific startup file.

16

tcl_traceCompile

Used for controlling the tracing of bytecode compilation. Use 0 for no output, 1 for summary, and 2 for detailed.

17

tcl_traceExec

Used for controlling the tracing of bytecode execution. Use 0 for no output, 1 for summary, and 2 for detailed.

18

tcl_version

Returns the current version of the Tcl interpreter.

 

上述特殊变量都有特殊含义。

举例:

tcl_version

tcl_library

env

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值