Syntax of iterate operation [message #523789] |
Mon, 29 March 2010 06:54  |
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 #523795 is a reply to message #523791] |
Mon, 29 March 2010 07:35  |
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 07:11  |
Eclipse User |
|
|
|
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 07:35  |
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
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03996 seconds