Re: EGL question [message #588410] |
Tue, 20 April 2010 15:34 |
Louis Rose Messages: 440 Registered: July 2009 Location: York, United Kingdom |
Senior Member |
|
|
Hi Steffen,
Good to hear from you. I hope you're well.
There's not support for sequence separation characters for loops, but
there is the EolCollection#concat method. In this case, the following
should do what you want:
[%=class.extends.concat(',');%]
Cheers,
Louis.
Steffen Zschaler wrote:
> Hi Louis,
>
> Does EGL provide support for sequence separation characters in for
> loops? For example, in generating an extends clause, could I write
> something like
>
> [%for (sc in class.extends; separator=',') {%]
> [%=sc.name%]
> [%}%]
>
>
> instead of having to keep writing this:
>
> [%first := true;
> for (sc in class.extends) {
> if (first)
> first := false
> else
> out.print (',');
> %]
> [%=sc.name%]
> [%}%]
>
>
> Cheers,
>
> Steffen
>
> --
> Dr. rer. nat. Steffen Zschaler
> Marie Curie Fellow
>
> Lancaster University
> Lancaster, United Kingdom
>
> Email szschaler@acm.org
> Phone +44 (01524) 510354
> WWW http://www.steffen-zschaler.de/
>
|
|
|
Powered by
FUDForum. Page generated in 0.03303 seconds