Ralf Hemmecke <[EMAIL PROTECTED]> writes:

> On 05/15/2008 11:27 AM, Martin Rubey wrote:
> > Thanks to Gaby, I was looking at the micro-semantics of the loop in the
> > following:
> > 
> >   lift?(p1:SUPP,p2:SUPP,uterm:UTerm,ldeg:List NNI,
> >                  lvar:List OV) : 
> > Union(s:SUPP,failed:"failed",notCoprime:"notCoprime") ==
> >     leadpol:Boolean:=false
> >     (listpol,lval):=(uterm.lpol,uterm.lint.first)
> >     d:=listpol.first
> >     listpol:=listpol.rest
> >     nolift:Boolean:=true
> >     for uf in listpol repeat
> >           --note uf and d not necessarily primitive
> >       degree gcd(uf,d) =0 => nolift:=false
> >     nolift => ["notCoprime"]
> >     f:SUPP:=([p1,p2]$List(SUPP)).(position(uf,listpol))
> 
> By which specification is uf allowed in the above line? In Aldor that 
> would be forbidden. What about SPAD?

SPAD has no specification, as far as I know.  Current behaviour in SPAD is
*roughly* as with "for free uf in ..." in aldor.  However, there is a
difference between iteration in lists and in segments:


for i in 1..10 repeat 
  dosomething

i

will return 11, not 10.

All of this loop business is highly inconsistent in FriCAS and Axiom, eg:

interpreted:  loop variables are local
              "=>" does not leave loop

compiled (even in interpreter):  loop variables are free
              "=>" leaves loop if there is only one statement


Martin


-------------------------------------------------------------------------
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

Reply via email to