Chinaunix首页 | 论坛 | 博客
  • 博客访问: 27536
  • 博文数量: 19
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 187
  • 用 户 组: 普通用户
  • 注册时间: 2015-10-14 16:24
文章分类

全部博文(19)

文章存档

2015年(19)

我的朋友

分类: 系统运维

2015-11-09 23:40:59

length(n)                   Tcl Built-In Commands                  llength(n)
___________________________________________________________________________


NAME 名称
       llength - Count the number of elements in a list

SYNOPSIS 摘要
       llength list
______________________________________________________________________________

DESCRIPTION 描述
       Treats list as a list and returns a decimal string giving the number of elements in it.
       把列表作为一个字符串,并返回一个十进制数表示元素的数量

EXAMPLES 实例
       The result is the number of elements:

点击(此处)折叠或打开

  1. % llength {a b c d e}
  2. 5
  3. % llength {a b c}
  4. 3
  5. % llength {}
  6. 0

Elements are not guaranteed to be exactly words in a  dictionary  sense.of course, especially when quoting is used:
元素不能保证完全是字典里的单词,当然,特别是当使用应用时。

点击(此处)折叠或打开

  1. % llength {a b {c d} e}
  2. 4
  3. % llength {a b { } c d e}
  4. 6
An empty list is not necessarily an empty string:
一个空列表不一定是一个空字符串

点击(此处)折叠或打开

  1. % set var { }; puts "[string length $var],[llength $var]"
  2. 1,0

              

阅读(416) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~