首页 | 本学科首页   官方微博 | 高级检索  
     

试谈Tcl的闭包
引用本文:张冬青.试谈Tcl的闭包[J].电脑编程技巧与维护,2010(24):9-10,52.
作者姓名:张冬青
作者单位:舟山广播电视总台,舟山316000
摘    要:为在Tcl编程语言中加入闭包(匿名函数),先对Tcl和闭包进行必要的了解,结合两者的特点,提出了针对Tcl的闭包解决方案,通过在闭包代码段前增加上下文环境信息以及组成,以列表参数和代码段为基础的闭包结构,成功地模拟出了闭包这一编程特性,给简化Tcl代码和优化Tcl代码结构提供了一个简单而高效的工具。

关 键 词:Tcl  闭包  上下文环境

Brief Introduction of Closure in Tcl
ZHANG Dongqing.Brief Introduction of Closure in Tcl[J].Computer Programming Skills & Maintenance,2010(24):9-10,52.
Authors:ZHANG Dongqing
Affiliation:ZHANG Dongqing(Zhoushan General Station of Broadcast and TV,Zhoushan 316000)
Abstract:To embed characteristic of closure to Tcl,we take a look at Tcl and closure briefly and put forward a solution by adding context information in the front of closure code and forming the structure of closure composed of arguments list and code block.It is a simply but effective tool to simplify the way of Tcl programming and code optimization.
Keywords:Tcl  Closure  Context
本文献已被 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号