Ralf Hemmecke <[EMAIL PROTECTED]> writes:
[...] | > Obviously because z is not "known" to the compiler when compiling | > 'bar'. It is nowhere is scope and has not been given any declaration | > locally. Right? What else would you expect? | | > http://axiom-wiki.newsynthesis.org/SandBoxLexicalScope#bottom | | Good question. Let's ask the compiler experts what the value of x | should be in the following piece of code. | | z: Integer := 0 | foo(n: Integer): Integer == n + z | z := 1 | x := foo(0) | | Ralf | | ----------------------------------------------------------------------- | For your convinience... | | )abbrev domain AAA Aaa | Aaa: with | foo: Integer -> Integer | == add | z: Integer := 0 | foo(n: Integer): Integer == n + z | z := 1 | | So why would I need "z: Integer := 0"? You need a *declaration*. -- Gaby ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ open-axiom-devel mailing list open-axiom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open-axiom-devel