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
随机推荐
- git merge简介【转】
转自:http://blog.csdn.net/hudashi/article/details/7664382 git merge的基本用法为把一个分支或或某个commit的修改合并现在的分支上.我们 ...
- C# 中通过API实现的打印类
using System;using System.Collections;using System.Text;using System.Runtime.InteropServices; using ...
- C# 获取所有打印机
List<string> print = Cprinter.GetLocalPrinter(); /// <summary> /// 获取所有打印机 /// </summ ...
- java web每天定时执行任务
第一步: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 ...
- How to: Synchronize Files by Using Managed Code
The examples in this topic focus on the following Sync Framework types: FileSyncProvider FileSyncOpt ...
- Linux进程控制(二)
1. 进程的创建 Linux下有四类创建子进程的函数:system(),fork(),exec*(),popen() 1.1. system函数 原型: #include <stdlib.h&g ...
- QQ发送邮件
//下面开始写SendEmail函数 public void SendEmail(string Emailshoujian, string Emailbiaoti, string Emailzheng ...
- EntityFramework:支持同一事务提交的批量删除数据实现思路
一切从一段代码说起... 下面一段代码是最近我在对一EF项目进行重构时发现的. protected override void DoRemove(T entity) { this.dbContext. ...
- android系统掉电保护
/************************************************************************ * android系统掉电保护 * 说明: * An ...
- (六) 语言模型 Language Madel 与 word2vec
语言模型简介(Language Model) 简单的说,语言模型 (Language Model) 是用来计算一个句子出现概率的模型,假设句子 ,其中 代表句子中的第 个词语,则语句 W 以该顺 ...