Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Modulo operation in EOL
Modulo operation in EOL [message #638949] Sat, 13 November 2010 18:02 Go to next message
Henning is currently offline Henning
Messages: 32
Registered: October 2010
Member
Hello,

I was wondering if there is any built-in modulo operation in EOL (I could not find any hints in the Epsilon book). Or do I need to implement it on my own?

Thanks,

Henning
Re: Modulo operation in EOL [message #638978 is a reply to message #638949] Sun, 14 November 2010 10:14 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Henning,

There's no built-in modulo operation but the following should do the trick:

operation Integer mod(i : Integer) {
return self - (self/i * i);
}

Cheers,
Dimitris

On 13/11/2010 20:02, Henning wrote:
> Hello,
>
> I was wondering if there is any built-in modulo operation in EOL (I
> could not find any hints in the Epsilon book). Or do I need to implement
> it on my own?
>
> Thanks,
>
> Henning
Re: Modulo operation in EOL [message #638982 is a reply to message #638978] Sun, 14 November 2010 11:03 Go to previous message
Henning is currently offline Henning
Messages: 32
Registered: October 2010
Member
This what I've been using so far - but thanks for the hint Wink
Previous Topic:[Flock] equivalent() not working
Next Topic:HutnGenerationException in property of an element
Goto Forum:
  


Current Time: Thu Oct 23 10:27:57 GMT 2014

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

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