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. webapp框架集合

    1.GoAngualrjs homepage  github GoAngular 可让你轻松使用 AngularJS 和 GoInstant 构建实时.多用户的应用程序. 2.JingleV home ...

  2. Win XP 如何禁用系统的自动更新

    想关闭系统的自动更新. 打开[控制面板]/[安全中心],发现“自动更新”和“更改安全中心通知我的方式”,都已成了灰色,无法更改. 网上查了一下,找到了这样一个处理方法:将[服务]中一个名为“Autom ...

  3. Android Touch(3)View的touchDelegate

    作用: 基类View有个函数 public void setTouchDelegate(TouchDelegate delegate),给view内部的另一个view设置一个touch代理. 图中vi ...

  4. Web Servers in Visual Studio for ASP.NET Web Projects

    https://msdn.microsoft.com/en-us/library/58wxa9w5(v=vs.120).aspx When you develop web projects in Vi ...

  5. [HDOJ1078]FatMouse and Cheese(记忆化搜索)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1078 题意:给出n, k,然后给出n*n的地图,(下标0~n-1),有一只老鼠从(0,0)处出发,只能 ...

  6. plsql programming 04 条件和顺序控制

    1. 条件语句 if salary > 40000 or salary is NULL then give_bonus(employee_id, 500); end if; if conditi ...

  7. Android中的PopupWindow详解

      Android的对话框有两种:PopupWindow和AlertDialog.它们的不同点在于: AlertDialog的位置固定,而PopupWindow的位置可以随意 AlertDialog是 ...

  8. 事务&视图和索引

    一:事务 1.含义:事务是一个不可分割的整体,事务中的多个执行过程,同生共死.要么都执行成功,要么都执行失败. 事务必须具备以下四个属性,(简称:ACID): ①.原子性(Atomicity):事务的 ...

  9. selinux --chcon命令

    chcon命令:修改对象(文件)的安全上下文.比如:用户:角色:类型:安全级别. 命令格式: Chcon [OPTIONS…] CONTEXT FILES….. Chcon [OPTIONS…] –r ...

  10. 别说你会用 Google 搜索

    Google 在我们的日常生活中越来越重要,很多时候,包括我在内的很多人一天也离不开 Google,但是,你真的会用 Google 吗?  PHP MySQL "Web developmen ...