axiom-mail
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-mail] Beginner problem with repeat


From: Martin Rubey
Subject: Re: [Axiom-mail] Beginner problem with repeat
Date: 18 Oct 2007 08:25:55 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Robert Funnell <address@hidden> writes:

> -- for some reason the solves don't get executed
> ip := 0;
> for ipp in 1..3 repeat
>    ip := ip + 1;
>    p == plist.ip;
>    output("p=",p);
>    solve(eq1,precision)

"Bill Page" <address@hidden> writes:

> Contrary to what I implied in my previous email, apparently Axiom's
> for loop is defined to return only a "Void" result. In contrast a
> sequence of statements does behave as you say so that for example the
> value of 'x' after the execution of:
> 
>   x:=(1;2;3)
> 
> is 3.

That's correct.  Furthermore, that's also the behaviour of aldor.

There is another thing:

    p == plist.ip;

defines p to be a (nullary) function.  You probably meant to say

    p := plist.ip;


Martin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]