On 05/13/2008 01:59 PM, Gabriel Dos Reis wrote:
> On Tue, May 13, 2008 at 6:35 AM, Ralf Hemmecke <[EMAIL PROTECTED]> wrote:
>
>>>> {
>>>> x: Integer := 4;
>>>> y: Integer := 3;
>>>> }
>>>> adds(a: Integer): Integer == x + a + z;
>>>> z: Integer := 3 + y
>>>>
>>> What do you think that means in Axiom?
>>>
>> If "Axiom" means "SPAD", then it should give the same as for Aldor.
>
> Why?
>
> (for starter, it is not legal Spad)
Ooops, what in
)abbrev domain AAA Aaa
Aaa: with
bar: Integer -> Integer
== add
(x: Integer := 4; y: Integer := 3)
bar(a: Integer): Integer == x + a + z
z: Integer := 3 + y
would be illegal? I just had to replace (as I said) the braces by
parentheses, since parens are used to group sequences of commands. (Same
as braces in Aldor.)
Where can I find the specification on which you base your comment?
The above code does indeed not compile (at least not in fricas). Why?
FriCAS (AXIOM fork) Computer Algebra System
Version: FriCAS 2008-01-18
Timestamp: Monday January 21, 2008 at 19:44:19
(Unfortunately, I don't have openaxiom in a compiled form at the moment.)
Moving the definition of bar to the end, will compile. And calling
bar(100) give the expected 110 as output.
Ralf
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/open-axiom-devel