On Mon, 11 Jul 2005, Jochen Cichon wrote:

> Hm, was my first Idea also,
> 
> but why is condition evaluated a second time ONLY if it is TRUE on the first
> run?

HTML::Template compiles an IF/ELSE into two JUMP IF ops:

     JUMP to A IF false
     ...
     ...
     JUMP TO B IF true
  A: ...
     ...
     ...
  B: ...

Thus a false condition is only tested once, but a true condition gets
tested twice.  The trick will be to link the two jumps so that the
second one re-examines the result of the first rather than running the
code again.

-sam


-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Html-template-users mailing list
Html-template-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/html-template-users

Reply via email to