Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Import of EOL libraries
Import of EOL libraries [message #649731] Thu, 20 January 2011 13:29 Go to next message
Konrad Schwarz is currently offline Konrad SchwarzFriend
Messages: 5
Registered: January 2011
Junior Member
Hi,

I was hoping to access a variable defined in a EOL module
"parameters.eol" in a second file "validate.evl" like
this:

/* parameters.eol */
var some_constant: Real = 0.001;

/* validate.evl */
import "parameters.eol";

pre {
some_constant.print();
}

But it does appear to work; some_constant is unknown.

What am I doing wrong?
Re: Import of EOL libraries [message #649733 is a reply to message #649731] Thu, 20 January 2011 13:38 Go to previous messageGo to next message
Konrad Schwarz is currently offline Konrad SchwarzFriend
Messages: 5
Registered: January 2011
Junior Member
Careful reading of 3.1 indicates that only EOL operations are imported--is this correct?

So constants should implemented as 0-arity operations, right?
Re: Import of EOL libraries [message #649735 is a reply to message #649733] Thu, 20 January 2011 13:41 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 912
Registered: July 2009
Senior Member
Hi Konrad,

That is correct.

Cheers,
Dimitris
Re: Import of EOL libraries [message #649736 is a reply to message #649731] Thu, 20 January 2011 13:32 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Konrad,

When you import an EOL module, only the operations defined in it are
imported.

Cheers,
Dimitris

On 20/01/2011 13:30, Konrad Schwarz wrote:
> Hi,
>
> I was hoping to access a variable defined in a EOL module
> "parameters.eol" in a second file "validate.evl" like
> this:
>
> /* parameters.eol */
> var some_constant: Real = 0.001;
>
> /* validate.evl */
> import "parameters.eol";
>
> pre {
> some_constant.print();
> }
>
> But it does appear to work; some_constant is unknown.
>
> What am I doing wrong?
Previous Topic:Errata in EpsilonBook.pdf, 29-Nov-2010
Next Topic:Backquotes/Backticks
Goto Forum:
  


Current Time: Mon Nov 24 01:43:14 GMT 2014

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

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