|
From: | Per Bothner |
Subject: | Re: translators and scoping rules (was: Re: language translator help) |
Date: | Sun, 28 Apr 2002 21:37:06 -0700 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0rc1) Gecko/20020417 |
John W. Eaton wrote:
On 28-Apr-2002, Per Bothner <address@hidden> wrote: | Am I right in guesing that Octave uses dynamic scoping, rather than | lexical scoping? Are those the only choices? :-) The rules are essentially the same as for Fortran. Variables are local to functions (subroutines). The only "global" variables are declared global (common).
What I was referring to was whether the following is defined, assuming f(10) is called with no global definition of x: function f (x) f = g() endfunction functioon g() g = x endfunction If this is allowed then you can't use normal Scheme variable functions for function parameter, even without using eval. -- --Per Bothner address@hidden http://www.bothner.com/per/
[Prev in Thread] | Current Thread | [Next in Thread] |