[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-mail] A little print problem
From: |
Bill Page |
Subject: |
Re: [Axiom-mail] A little print problem |
Date: |
Tue, 16 Oct 2007 09:40:11 -0400 |
On 10/16/07, Alasdair McAndrew <address@hidden> 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.