Skip to main content


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 HenningFriend
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 KolovosFriend
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 HenningFriend
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: Fri Mar 29 11:36:48 GMT 2024

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

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

Back to the top