[stringtemplate-interest] Conditional statements

David Moshal dmoshal at gmail.com
Fri May 5 07:03:47 PDT 2006


Galen,

I second that feature request, or alternatively, if that feature is
supported, if
someone could shed a bit more light on the subject of ST's evaluation
capabilities that would be appreciated. I find that I'm currently creating
many more temporary objects in my java code, in order to provide ST with
simple conditionals, than I suspect are needed.

Additionally, is there a way to find the current count of a collection,
ie, if one has the following code:

$items:{

    can one get the current iteration number here?
    can one change the current iteration to be 1-based rather than
zero-based?
}



Dave


On 5/5/06, Galen Dunkleberger <galendunkleberger at gmail.com> wrote:
>
> Is it possible to somehow have multiple arguments for a conditional
> statement other than using nested ifs. For instance something like...
>
>                         $if(a.x && b.z)$
>                                 show something
>                         $else$
>                                 show something else
>                         $endif$
>
> If this is not currently possible could I make a feature request?
>                                 Thanks,
>                                  Galen
>
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org:8080/mailman/listinfo/stringtemplate-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org:8080/pipermail/stringtemplate-interest/attachments/20060505/b5664afb/attachment.html


More information about the stringtemplate-interest mailing list