aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/padic.spad.pamphlet
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-06-13 13:04:44 +0000
committerdos-reis <gdr@axiomatics.org>2010-06-13 13:04:44 +0000
commit9a4759f38f13d4bf79133846eb5fd2aff58b2235 (patch)
treed4340ca9e276c48eab6ca3fe17b0a42a07dfc224 /src/algebra/padic.spad.pamphlet
parentab08176716d51ab7c61f36f7786268bbe7cbcc5c (diff)
downloadopen-axiom-9a4759f38f13d4bf79133846eb5fd2aff58b2235.tar.gz
* algebra/padic.spad.pamphlet (InnerPAdicInteger) [coerce]: Tidy.
Diffstat (limited to 'src/algebra/padic.spad.pamphlet')
-rw-r--r--src/algebra/padic.spad.pamphlet11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/algebra/padic.spad.pamphlet b/src/algebra/padic.spad.pamphlet
index 61e5ca9a..6b3481d1 100644
--- a/src/algebra/padic.spad.pamphlet
+++ b/src/algebra/padic.spad.pamphlet
@@ -290,18 +290,21 @@ InnerPAdicInteger(p,unBalanced?): Exports == Implementation where
coerce(x:%):OUT ==
empty?(st := stream x) => 0 :: OUT
- n : NNI ; count : NNI := _$streamCount$Lisp
+ count : NNI := _$streamCount$Lisp
l : L OUT := empty()
- for n in 0..count while not empty? st repeat
+ n : NNI := 0
+ while n <= count while not empty? st repeat
if frst(st) ~= 0 then
l := concat(termOutput(n :: I,frst st),l)
st := rst st
+ n := n + 1
if showAll?() then
- for n in (count + 1).. while explicitEntries? st and _
- not eq?(st,rst st) repeat
+ n := count + 1
+ while explicitEntries? st and not eq?(st,rst st) repeat
if frst(st) ~= 0 then
l := concat(termOutput(n pretend I,frst st),l)
st := rst st
+ n := n + 1
l :=
explicitlyEmpty? st => l
eq?(st,rst st) and frst st = 0 => l