From 7dff09b8cac803d6936887fdfa286a2a25073ac2 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sun, 14 Aug 2011 21:23:34 +0000 Subject: * interp/lisp-backend.boot ($freeVarName): New global constant. (loopVarInit): New. (expandIN): Use it. (expandON): Likewise. (expandSTEP): Likewise. (massageFreeVarInits): New. (expandLoop): Use it. * interp/fnewmeta.lisp (PARSE-QuantifiedVariable): Tidy. (PARSE-AnyId): Likewise. (PARSE-Variable): New. Allow scope-of-type specification for loop variable. (PARSE-Iterator): Use it. * interp/compiler.boot (massage_llop): Don't check $mayHaveFreeIteratorVariables. (compRepeatOrCollect): Don't bind it. (classifyIteratorVariable): New. (complainIfShadowing): Remove as no longer needed. (compStepIterator): Use it. Tidy. (compONIterator, compINIterator): New. Split out of compIterator. (compIterator): Refactor. * interp/functor.boot (optFunctorBody): Fix thinko. * interp/g-opt.boot (optCollectVector): A STEP iterator may have a storage class. * algebra/clip.spad.pamphlet: Fix loop variable scope. * algebra/ffpoly.spad.pamphlet: Likewise. * algebra/fparfrac.spad.pamphlet: Likewise. * algebra/gdpoly.spad.pamphlet: Likewise. * algebra/ghensel.spad.pamphlet: Likewise. * algebra/groebsol.spad.pamphlet: Likewise. * algebra/intfact.spad.pamphlet: Likewise. * algebra/matfuns.spad.pamphlet: Likewise. * algebra/moddfact.spad.pamphlet: Likewise. * algebra/numtheor.spad.pamphlet: Likewise. * algebra/permgrps.spad.pamphlet: Likewise. * algebra/pfbr.spad.pamphlet: Likewise. * algebra/pgcd.spad.pamphlet: Likewise. * algebra/pleqn.spad.pamphlet: Likewise. * algebra/pseudolin.spad.pamphlet: Likewise. * algebra/radeigen.spad.pamphlet: Likewise. * algebra/radix.spad.pamphlet: Likewise. * algebra/regset.spad.pamphlet: Likewise. * algebra/rep2.spad.pamphlet: Likewise. * algebra/sgcf.spad.pamphlet: Likewise. * algebra/smith.spad.pamphlet: Likewise. * algebra/sregset.spad.pamphlet: Likewise. * algebra/syssolp.spad.pamphlet: Likewise. * algebra/zerodim.spad.pamphlet: Likewise. * algebra/crfp.spad.pamphlet: Remove capsule-level declaration of local variables. * algebra/galfact.spad.pamphlet: Likewise. * algebra/mathml.spad.pamphlet: Likewise. * algebra/numode.spad.pamphlet: Likewise. * algebra/tex.spad.pamphlet: Likewise. * algebra/updecomp.spad.pamphlet: Likewise. --- src/algebra/matfuns.spad.pamphlet | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/algebra/matfuns.spad.pamphlet') diff --git a/src/algebra/matfuns.spad.pamphlet b/src/algebra/matfuns.spad.pamphlet index 47cc96e3..cf739082 100644 --- a/src/algebra/matfuns.spad.pamphlet +++ b/src/algebra/matfuns.spad.pamphlet @@ -149,7 +149,7 @@ InnerMatrixLinearAlgebraFunctions(R,Row,Col,M):_ v : IndexedOneDimensionalArray(I,minC) := new(ncol,minR - 1) j : Integer for i in minR..(minR + rk - 1) repeat - for j in minC.. while qelt(x,i,j) = 0 repeat j + for j: free in minC.. while qelt(x,i,j) = 0 repeat j qsetelt!(v,j,i) j := maxC; l := minR + ncol - 1 while j >= minC repeat @@ -186,7 +186,7 @@ InnerMatrixLinearAlgebraFunctions(R,Row,Col,M):_ swapRows!(x,i,rown); ans := -ans ans := qelt(x,i,j) * ans; b := -inv qelt(x,i,j) for l in (j+1)..maxC repeat qsetelt!(x,i,l,b * qelt(x,i,l)) - for k in (i+1)..maxR repeat + for k: local in (i+1)..maxR repeat if (b := qelt(x,k,j)) ~= 0 then for l in (j+1)..maxC repeat qsetelt!(x,k,l,qelt(x,k,l) + b * qelt(x,i,l)) @@ -587,7 +587,7 @@ MatrixLinearAlgebraFunctions(R,Row,Col,M):Exports == Implementation where swapRows!(x,i,rown) ans := -ans (c := qelt(x,i,j)) = 0 => "next j" -- try next column - for k in (i+1)..maxR repeat + for k: local in (i+1)..maxR repeat if qelt(x,k,j) = 0 then for l in (j+1)..maxC repeat qsetelt!(x,k,l,(c * qelt(x,k,l) exquo b) :: R) -- cgit v1.2.3