SY *_*HEN 1 tcl
您如何有效地在Tcl中清空列表?
我尝试使用lreplace清空列表,例如:
set lst "a b c d e" lreplace $lst 0 [[llength $lst] - 1] # replace all content in the list with "".
Don*_*ows 5
空字符串是一个有效的值。
set lst {}
您可以不使用[list]任何参数来代替{}; 编译成同一件事。
[list]
{}
归档时间:
8 年,12 月 前
查看次数:
7519 次
最近记录: