On Tuesday 05 November 2002 12:31, Philip S Tellis wrote:
> Sometime Today, Martijn van den Burg assembled some asciibets to say:
> > I started using the __counter__ variable to dynamically build
> > JavaScript arrays in my HTML. Unfortunately __counter__ starts
> > counting at 1 (one), resulting in my first (i.e. index zero) array
> > elements not being initialized.
>
> Isn't it just easier to use arr[<tmpl_var __counter__> - 1]; ?

Easier, yes. But it results in unelegant (if not to say ugly) and less clear 
code:

fruits[1 - 1] = new fruitObj('apple','red');

<Martijn />

-- 
+----------------------------------+
        Martijn van den Burg
  ASML, CS PPC Inform@tion Systems
     Voice: +31 (0)40 268 3856
+----------------------------------+



-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users

Reply via email to