appleScript学习之疑问二

第14章 处理程序——handler

例[8]

on circleCalculations(radius)         

  set area to pi * (radius ^ 2)         


  set circumference to 2 * pi * radius         

  return {area, circumference}        

  set testVar to 3

end circleCalculations

set circlePropreties to circleCalculations(10)



疑问:1、第[8.5]行(set testVar to 3)有什么用?我试了一下,删掉行脚本也能正常运行。

2、另外,一直很疑问testVar 要怎么翻译,这个Var应该是某个单调的缩写,但查不明白是哪个词的。



后记:自己在google上没找到2的答案,倒是在百度上找到了: 计算机术语   var 是 variable(变量,可变物)的简写。在多种计算机编程语言中,var 被用作定义变量的关键字,在一些操系统中也能见到它的身影。 (详见百度百科:http://baike.baidu.com/view/407694.htm

英语不好,有时候还是得靠度娘。。。。好好学英语吧zhangdeyuan

posted @ 2011-12-04 01:41  zhangdeyuan  阅读(191)  评论(0编辑  收藏  举报