Tcl之Intro
Tool command language, a widely used scripting tool that was deveoped for controlling and extending appliations.
1 Run
When you have installed Tcl, the program you will then call to utilize it is tclsh.
For instance, if you write some code to a file "hello.tcl", and you want to execute it, you would do it like so: tclsh hello.tcl
2 UNIX Tcl scripts (type "tclsh")
1) puts - writes the string to I/O steam
puts "Hello, World - In quotes" ; # This is a comment after the command.
puts {Hello, World - In Braces}
puts {Bad comment syntax example} # *Error* - there is no semicolon puts "line 1"; puts "line 2" puts "Hello, World; - With a semicolon inside the quotes" # Words don't need to be quoted unless they contain white space:
puts HelloWorld
2) set - assign a value to a variable
The dollar sign $ tells Tcl to use the value of the variable - in this case X or Y.
set X "This is a string" set Y 1.24 puts $X
puts $Y puts "..............................." set label "The value in Y is: "
puts "$label $Y"
Tcl之Intro的更多相关文章
- TCL:使用、添加库文件
>直接引用工具自带的库文件 通过指令: .1查看能直接调用的库文件路径 #可以查到工具默认库文件路径,一般包括回显中的路径以及回显中路径的父路径. info library #D:/Script ...
- Tcl internal variables
Tcl internal variables eryar@163.com 在Tcl中内置了一些变量,并赋予了一定的功能.内置变量列表如下: 变量名称 功能描述 argc 指命令行参数的个数. argv ...
- SDC Tcl package of Timequest
Tcl comand Tcl Commands all_clocks all_inputs all_outputs all_registers create_clock create_generate ...
- Oracle数据库操作分类DDL、DML、DCL、TCL类别清单异同
DDL Data Definition Language (DDL) statements are used to define the database structure or schema. S ...
- Intro to CSS 3D transforms
原文地址:Intro to CSS 3D transforms,本文只是翻译了其中的一部分,省去了作者写文章的原因浏览器兼容部分(已经过时) Perspective 元素需要设置需要设置perspec ...
- linux tcl expect 安装(转)
linux tcl expect 安装 一.Tcl安装 1. 下载:tcl8.4.20-src.tar.gz http://www.tcl.tk/software/tcltk/downloadnow ...
- 为Tcl编写C的扩展库
Tcl是一个比较简洁的脚本语言,官方地址 http://www.tcl.tk. tcl脚本加载C实现的动态库非常方便. 1. 为Tcl编写一个用C实现的扩展函数. #include <stdio ...
- Tcl
Tcl(发音 tickle)是一种脚本语言.由John Ousterhout创建.TCL经常被用于快速原型开发 RAD.脚本编程.GUI编程和测试等方面. Expect Expect是 另外一种非常流 ...
- MySQL TCL 整理
TCL(Transaction Control Language)事务控制语言SAVEPOINT 设置保存点ROLLBACK 回滚SET TRANSACTION
随机推荐
- 解决 iReport 生成 pdf 时显示不出中文的问题
有没有遇到这样的情况:在使用 iReport 做报表时,用pdf预览显示不出中文? 解决步骤是这样的: 1.加入jar包 下载两个jar包:itextasian.jar 和 itext-x.y.jar ...
- 【HDOJ】3901 Wildcard
1. 题目描述有两个长度为$10^5$的字符串,其中一个仅包含小写字母,称之为源串:另一个包含?与*通配符的模式串,并且通配符的个数不超过10.求模式串是否能匹配源串? 2. 基本思路这其实是一道Re ...
- Finalization
1.what is the main disadvantage of garbage collection? Typically, garbage collection has certain dis ...
- maven3实战之仓库(快照版本)
maven3实战之仓库(快照版本) ---------- 在Maven的世界中,任何一个项目或者构件都必须有自己的版本.版本的值可能是1.0.0,1.3-alpha-4,2.0,2.1-SNAPSHO ...
- HTML+CSS+JAVASCRIPT 总结
1. HTML 1: <!doctype html> 2: <!-- This is a test html for html, css, javascript --> 3: ...
- HDU 1404 (博弈) Digital Deletions
首先如果第一个数字是0的话,那么先手必胜. 对于一个已知的先手必败状态,凡是能转移到先手必败的状态一定是必胜状态. 比如1是必败状态,那么2~9可以转移到1,所以是必胜状态. 10,10*,10**, ...
- memcached的LRU删除机制
1)memcached不会自动清空缓存的值如果add了一个值,但不去get它,那么这个值过期了,它也不会被清空.解释:memcached不自动检测和清空值,它只当你需要get这个值的时候,才检测这个值 ...
- CodeIgniter 3之Session类库(3)(转)
本文主要讲CI2和CI3关于Session类库的区别.我们知道CI2的Session类使用了cookie来传递session数据.使用 cookie保存会话的好处在于可以节省服务器资源,但坏处也是显而 ...
- matlab中矩阵和向量的创建
1.向量的创建 1)直接输入: 行向量:a=[1,2,3,4,5] 列向量:a=[1;2;3;4;5] 2)用“:”生成向量 a=J:K 生成的行向量是a=[J,J+1,…,K] a=J:D:K 生成 ...
- (六)6.12 Neurons Networks from self-taught learning to deep network
self-taught learning 在特征提取方面完全是用的无监督的方法,对于有标记的数据,可以结合有监督学习来对上述方法得到的参数进行微调,从而得到一个更加准确的参数a. 在self-taug ...