Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Syntax of iterate operation
Syntax of iterate operation [message #523789] Mon, 29 March 2010 10:54 Go to next message
Eclipse User
Originally posted by: c.k.holmes.lboro.ac.uk

Hi,
I would like to use the EOL iterate operation on a collection of objects
of type OrderedSet, however I'm having difficulty understanding the
syntax of the operation.

e.g.
var msbs : OrderedSet(Integer) := self.getFields().collect(field |
field.msb).asOrderedSet();
var maxMsb : Integer := 0;
msb := msbs.iterate(msb : Integer; x : Integer = 0 | msb.max(x));

The iterate operation fails to parse, although I think this conforms to
the format identified in the Epsilon book. This form also fails to parse:
msb := msbs.iterate(msb; x=0 | msb.max(x));

I'm obviously doing something daft, can someone correct my mistake?

Regards
Chris
Re: Syntax of iterate operation [message #523791 is a reply to message #523789] Mon, 29 March 2010 06:18 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Chris,

Alas, this seems to be a bug. Could you please file a bug report and use
"for" loops instead of "iterate" until we get this fixed?

Cheers,
Dimitris

Chris Holmes wrote:
> Hi,
> I would like to use the EOL iterate operation on a collection of objects
> of type OrderedSet, however I'm having difficulty understanding the
> syntax of the operation.
>
> e.g.
> var msbs : OrderedSet(Integer) := self.getFields().collect(field |
> field.msb).asOrderedSet();
> var maxMsb : Integer := 0;
> msb := msbs.iterate(msb : Integer; x : Integer = 0 | msb.max(x));
>
> The iterate operation fails to parse, although I think this conforms to
> the format identified in the Epsilon book. This form also fails to parse:
> msb := msbs.iterate(msb; x=0 | msb.max(x));
>
> I'm obviously doing something daft, can someone correct my mistake?
>
> Regards
> Chris


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: Syntax of iterate operation [message #523795 is a reply to message #523791] Mon, 29 March 2010 11:35 Go to previous message
Eclipse User
Originally posted by: c.k.holmes.lboro.ac.uk

Hi Dimitris,
OK, will do.

Best Wishes
Chris

Dimitris Kolovos wrote:
> Hi Chris,
>
> Alas, this seems to be a bug. Could you please file a bug report and use
> "for" loops instead of "iterate" until we get this fixed?
>
> Cheers,
> Dimitris
>
> Chris Holmes wrote:
>> Hi,
>> I would like to use the EOL iterate operation on a collection of
>> objects of type OrderedSet, however I'm having difficulty
>> understanding the syntax of the operation.
>>
>> e.g.
>> var msbs : OrderedSet(Integer) := self.getFields().collect(field |
>> field.msb).asOrderedSet();
>> var maxMsb : Integer := 0;
>> msb := msbs.iterate(msb : Integer; x : Integer = 0 | msb.max(x));
>>
>> The iterate operation fails to parse, although I think this conforms
>> to the format identified in the Epsilon book. This form also fails to
>> parse:
>> msb := msbs.iterate(msb; x=0 | msb.max(x));
>>
>> I'm obviously doing something daft, can someone correct my mistake?
>>
>> Regards
>> Chris
>
>
Re: Syntax of iterate operation [message #587870 is a reply to message #523789] Mon, 29 March 2010 11:11 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Chris,

Alas, this seems to be a bug. Could you please file a bug report and use
"for" loops instead of "iterate" until we get this fixed?

Cheers,
Dimitris

Chris Holmes wrote:
> Hi,
> I would like to use the EOL iterate operation on a collection of objects
> of type OrderedSet, however I'm having difficulty understanding the
> syntax of the operation.
>
> e.g.
> var msbs : OrderedSet(Integer) := self.getFields().collect(field |
> field.msb).asOrderedSet();
> var maxMsb : Integer := 0;
> msb := msbs.iterate(msb : Integer; x : Integer = 0 | msb.max(x));
>
> The iterate operation fails to parse, although I think this conforms to
> the format identified in the Epsilon book. This form also fails to parse:
> msb := msbs.iterate(msb; x=0 | msb.max(x));
>
> I'm obviously doing something daft, can someone correct my mistake?
>
> Regards
> Chris


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: Syntax of iterate operation [message #587883 is a reply to message #587870] Mon, 29 March 2010 11:35 Go to previous message
Eclipse User
Originally posted by: c.k.holmes.lboro.ac.uk

Hi Dimitris,
OK, will do.

Best Wishes
Chris

Dimitris Kolovos wrote:
> Hi Chris,
>
> Alas, this seems to be a bug. Could you please file a bug report and use
> "for" loops instead of "iterate" until we get this fixed?
>
> Cheers,
> Dimitris
>
> Chris Holmes wrote:
>> Hi,
>> I would like to use the EOL iterate operation on a collection of
>> objects of type OrderedSet, however I'm having difficulty
>> understanding the syntax of the operation.
>>
>> e.g.
>> var msbs : OrderedSet(Integer) := self.getFields().collect(field |
>> field.msb).asOrderedSet();
>> var maxMsb : Integer := 0;
>> msb := msbs.iterate(msb : Integer; x : Integer = 0 | msb.max(x));
>>
>> The iterate operation fails to parse, although I think this conforms
>> to the format identified in the Epsilon book. This form also fails to
>> parse:
>> msb := msbs.iterate(msb; x=0 | msb.max(x));
>>
>> I'm obviously doing something daft, can someone correct my mistake?
>>
>> Regards
>> Chris
>
>
Previous Topic:Syntax of iterate operation
Next Topic:Debugging ETL
Goto Forum:
  


Current Time: Thu Oct 23 16:44:06 GMT 2014

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

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