词条 | 词法域 |
释义 |
Lexical Scoping Lexical Scoping(sometimes called static) is the method used to define the scope andextent of variables in Scheme, Common Lisp, Pascal and Algol. Lexicalscoping requires keeping track of the lexical order as well as thedynamic execution order at runtime. This means that a Scheme procedurecall will of necessity be more expensive than a similar call in C orFortran 解析:词法域是一种用来定义在Scheme,CommonLisp,Pascal,Algol中环境及外部变量的方法,词法域不仅需要跟踪程序的语法顺序,并且也要遵循程序运行时的执行顺序来完成。这表明Scheme的过程调用比C或者Fortran这类面向对象程序要求更加多的资源需求。 词法域是块结构的更进一步,如果嵌套过程中的参数如果外部过程已经定义过了(从外面过程传递进来),对于该嵌套过程,可以省略参数,但是过程内部仍然可以使用外部过程定义过的参数。这种块结构称为词法域。 相关阅读:Dynamic Scoping 动态作用域 |
随便看 |
百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。