Re: A little print problem
"Alasdair McAndrew" <[email protected]>
| Newsgroups | gmane.comp.mathematics.axiom.user |
|---|---|
| Message-ID | <[email protected]> |
Thanks, Martin and Bill. As always your replies have been both swift and very helpful. cheers, Alasdair On 10/16/07, Bill Page <[email protected]> wrote: > > On 10/16/07, Alasdair McAndrew <[email protected]> wrote: > > Here it is: > > > > F:=FFP(PF 2,x^3+x+1) > > x:=generator()$F > > for i in 0..7 repeat print [i,x^i] > > > > [0,1] > > [1,%D] > > 2 > > [0,%D ] > > [1,%D + 1] > > 2 > > [0,%D + %D] > > 2 > > [1,%D + %D + 1] > > 2 > > [0,%D + 1] > > [1,1] > > > > Note that because of the PF 2, the values of i in the lists to be > printed > > are automatically reduced mod 2. But this is not what I want - I want > the > > printed values of i to range from 0 to 7. How can I do this, given > that > > print only takes one argument? > > > > Try this: > > (9) -> for i in 0..7 repeat output(i::String,x^i) > 0 1 > 1 %A > 2 > 2 %A > 3 %A + 1 > 2 > 4 %A + %A > 2 > 5 %A + %A + 1 > 2 > 6 %A + 1 > 7 1 > Type: Void > > Regards, > Bill Page. > _______________________________________________ Axiom-mail mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/axiom-mail