[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [ease-dev] Importing other modules (Martin Kloesch)
|
Aah, thanks for that Martin. We've managed to produce the URLs.
Here's an example for future reference:
sum.js:
function sum(a, b){
return a+b;
}
testCall.js:
include("workspace:/project/scripting/sum.js")
print(sum(2,3));
Thanks again,
Ian
> Date: Mon, 07 Jan 2019 18:59:56 +0100
> From: Martin Kloesch
> To: ease developer discussions <ease-dev@xxxxxxxxxxx>
> Subject: Re: [ease-dev] Importing other modules
> Message-ID: <37b6c595-5d32-41f9-88b5-2f69e6323d05@xxxxxxxxxxxxxxxxx>
> Content-Type: text/plain; charset="us-ascii"
> Hi,
> I would suggest you use the "include" function for this. This will simply load and executed the
> content of the given script. It also supports "project:/" and "workspace:/" URLs.
> Be aware that it will execute the file so if you call anything with a top-level statement this
> will be executed too (like calling main() at the end of your script).
> Best regards,
> Martin