[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Recursion & loops
From: |
Ludovic Court?s |
Subject: |
Recursion & loops |
Date: |
Mon, 18 Nov 2002 18:03:21 +0100 |
User-agent: |
Mutt/1.3.28i |
Hi,
I'm trying to create an empty table that would fit one whole page.
Optionally, I'd like to have the row number printed in the first column of
each row. I tried to define a loop that would create the rows for me but I
failed. Here is the loop:
def @Loop
named from { 1 }
named to { 20 }
body @Body
{
from @Case
{
to @Yield { @Body }
else @Yield { @Body @Loop from { @Next from } to { to } { @Body } }
}
}
Inside my @Tbl, I just write the following:
@Loop from { 1 } to { 20 } { @Rowb }
where @Rowb is the (empty) row I want to add. However, I end up with the
following error:
fatal error: maximum depth of symbol expansion (1000) reached
Preceding the @Loop invocation with an @VLimited removes the error but then
nothing gets printed.
Also, I don't know how I could get the rown number printed in the first column
of the row, doing something like @Loop ... { @Rowb A { @RowNumber } }.
Any ideas?
Thanks,
Ludovic.
- Recursion & loops,
Ludovic Court?s <=