You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Angus Lees <gu...@switchonline.com.au> on 2001/05/24 05:47:12 UTC
Re: Dynamic Tables NOT not working if using an array that does NOT start with and index of 0 (zero) or uses non sequential integers in the index
On Wed, May 23, 2001 at 10:52:50PM -0700, Michael George III wrote:
> Dynamic Tables are NOT working if using an array that does not start with
> and index of 0 (zero) or uses non sequential integers in the index.
> <html>
> <body>
> [- @v[0] = "hello,";
> @v[2] = "world,";
> -]
> <table border=1>
> <tr>
> <td>[+ $v[$row] +]</td>
> </tr>
> </table>
> </body>
> </html>
> I didn't find anything in the docs that stated arrays had to begin with
> element zero and had to be sequentially numbered integers :)
from HTML::Embperl(3):
$tabmode = 1
End table looping when any one of the expressions in
the table row using $row returns undefined. The row
containing the undefined expression is not displayed.
Only those expressions are observed which contain an
access to the variable $row.
if you really wanted to do this, you could do:
[- $maxrow = @v; $tabmode = 4; -]
and then do something intelligent when $v[$row] is undefined.
--
- Gus
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org