Chinaunix首页 | 论坛 | 博客
  • 博客访问: 730608
  • 博文数量: 696
  • 博客积分: 15910
  • 博客等级: 上将
  • 技术积分: 7345
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-03 14:34
文章分类

全部博文(696)

文章存档

2012年(263)

2011年(394)

2010年(39)

分类: Python/Ruby

2012-09-01 11:53:36



1. Everything Is A String

The types of variables are not declared in Tcl. There is no need since there is only one
type: string. Every value is a string. Numbers are strings. Even commands and variables
are strings! The following commands set the variable name to the string value "Don", the
variable word to the value "foobar", and the variable pi to "3.14159".

set name Don
set word foobar
set pi 3.14159

Variable names, values, and commands are case sensitive. So the variable name is
different than Name.

To access a variable's value, prefix the variable name with a dollar sign ($). The
following command sets the variable phrase to foobar by retrieving it from the
variable word.

set phrase $word
阅读(708) | 评论(0) | 转发(0) |
0

上一篇:SQL Group by

下一篇:spring下载

给主人留下些什么吧!~~