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) putswrites 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的更多相关文章

  1. TCL:使用、添加库文件

    >直接引用工具自带的库文件 通过指令: .1查看能直接调用的库文件路径 #可以查到工具默认库文件路径,一般包括回显中的路径以及回显中路径的父路径. info library #D:/Script ...

  2. Tcl internal variables

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

  3. SDC Tcl package of Timequest

    Tcl comand Tcl Commands all_clocks all_inputs all_outputs all_registers create_clock create_generate ...

  4. Oracle数据库操作分类DDL、DML、DCL、TCL类别清单异同

    DDL Data Definition Language (DDL) statements are used to define the database structure or schema. S ...

  5. Intro to CSS 3D transforms

    原文地址:Intro to CSS 3D transforms,本文只是翻译了其中的一部分,省去了作者写文章的原因浏览器兼容部分(已经过时) Perspective 元素需要设置需要设置perspec ...

  6. linux tcl expect 安装(转)

    linux tcl expect 安装 一.Tcl安装 1.  下载:tcl8.4.20-src.tar.gz http://www.tcl.tk/software/tcltk/downloadnow ...

  7. 为Tcl编写C的扩展库

    Tcl是一个比较简洁的脚本语言,官方地址 http://www.tcl.tk. tcl脚本加载C实现的动态库非常方便. 1. 为Tcl编写一个用C实现的扩展函数. #include <stdio ...

  8. Tcl

    Tcl(发音 tickle)是一种脚本语言.由John Ousterhout创建.TCL经常被用于快速原型开发 RAD.脚本编程.GUI编程和测试等方面. Expect Expect是 另外一种非常流 ...

  9. MySQL TCL 整理

    TCL(Transaction Control Language)事务控制语言SAVEPOINT 设置保存点ROLLBACK  回滚SET TRANSACTION

随机推荐

  1. RPC简介及原理

    简介 RPC(Remote Procedure Call,远程过程调用)是建立在Socket之上的,在一台机器上运行的主程序,可以调用另一台机器上准备好的子程序,就像LPC(本地过程调用). 越底层, ...

  2. C# 将字符串转化成流,将流转换成字符串

    using System; using System.IO; using System.Text; namespace CSharpConvertString2Stream { class Progr ...

  3. 寻找最小的k个数

    1. 能想到的最直接的办法,就是对数组进行排序,最好的排序算法的时间复杂性为O(n*logn),这一个方法请参照各种排序算法. 2. 另外申请一个k空间数组,依次更改里面的最大值,每做一次最多要扫描一 ...

  4. 5.cadence原理图上[原创]

    一.库管理 1.打开原理图,,按键盘P键 在目标库下可以直接收索需要的元件,则可直接找到 在原理图中放置器件时,结束放置快捷键:Esc 双击后,可自动将该元件对应的库添加到你的库中,该方法找元件效果好 ...

  5. shell进行mysql统计

    array=(江苏 浙江 新疆 宁夏 广东 福建 重庆 江西 吉林 湖南 山东 云南  上海 河北 黑龙江 北京 四川 河南 山西 湖北 辽宁 安徽 陕西 广西 贵州 内蒙古 天津 甘肃 海南 青海 ...

  6. UNIX / Linux: 2 Ways to Add Swap Space Using dd, mkswap and swapon

    UNIX / Linux: 2 Ways to Add Swap Space Using dd, mkswap and swapon by RAMESH NATARAJAN on AUGUST 18, ...

  7. 读取Properties文件工具类

    import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java ...

  8. GUI for git|SourceTree|入门基础

    原文链接:http://www.jianshu.com/p/be9f0484af9d 目录 SourceTree简介 SourceTree基本使用 SourceTree&Git部分名词解释 相 ...

  9. UVa 247 Calling Circles【传递闭包】

    题意:给出n个人的m次电话,问最后构成多少个环,找出所有的环 自己想的是:用map来储存人名,每个人名映射成一个数字编号,再用并查集,求出有多少块连通块,输出 可是map不熟,写不出来,而且用并查集输 ...

  10. [转] POJ字符串分类

    POJ 1002 - 487-3279(基础)http://acm.pku.edu.cn/JudgeOnline/problem?id=1002题意:略解法:二叉查找数,map,快排... POJ 1 ...