[ZPT] Is this slot filled?

Lalo Martins lalo@hackandroll.org
Sat, 5 May 2001 21:00:32 -0300


On Sat, May 05, 2001 at 03:24:41PM -0500, Evan Simpson wrote:
> From: "Lalo Martins" <lalo@hackandroll.org>
> > Is there any way I can know, inside a macro, if slot X was filled?
> 
> Not directly, though you could define a global variable above the macro
> use, or a local variable on a tag enclosing the macro use.

You lost me here. Define a variable where? In which template,
the one that defines the macro or the one that uses it? And use
the variable how?

> Since macros are processed before any TAL gets executed, it might make
> sense to have some kind of builtin variable from which you can extract
> information about macros used and slots filled (or unfilled).  This will
> require some thought, since the information appears to be primarily
> useful in macro definitions.

Yes. I think my example and the manage_tabs case are very
common, that you'll want to have something depend on whether a
given slot was filled.

[]s,
                                               |alo
                                               +----
--
           I say a prayer now our love's departed
                That you'll come back to stay
                  Bring back the perfect day

http://www.laranja.org/                mailto:lalo@laranja.org
         pgp key: http://www.laranja.org/pessoal/pgp

Brazil of Darkness (RPG)      ---       http://www.BroDar.org/