Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Re: EGL question
Re: EGL question [message #588410] Tue, 20 April 2010 15:34
Louis Rose is currently offline Louis RoseFriend
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/
>
Previous Topic:EGL execution error
Next Topic:Re: EGL question
Goto Forum:
  


Current Time: Fri Apr 19 22:28:11 GMT 2024

Powered by FUDForum. Page generated in 0.03303 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top