Book a Demo

Author Topic: Where is the scripting Maths library?  (Read 5789 times)

EXploringEA

  • EA User
  • **
  • Posts: 172
  • Karma: +8/-0
    • View Profile
Where is the scripting Maths library?
« on: October 01, 2014, 02:14:22 am »
Doing some testing exploring the capabilities of Scripts and the simple example provided in user guide

Session.Output "The square root of 9 is " & Maths.sqrt(9)

fails to work with "Object required: 'Maths'"

so checked case and other potential issues with typos but still same error.

User guide states that it is "inbuilt Maths object" so assume I don't need to install anything else or do I?

BTW: Does anybody have reference to details of scripting engines - whose are they?  what documentation exist?

Thanks



EXploringEA - information, utilities and addins

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Where is the scripting Maths library?
« Reply #1 on: October 01, 2014, 03:02:56 am »
Doesn't work for me either. The snippet from the help
Code: [Select]
Session.Output "2^10 = " & Maths.pow(2,10)raises an error. Using V11.

HELP:
Quote
Various mathematical functions are available within the Script Editor, through the use of the inbuilt Maths object.

You can access the Maths object within the Script Editor by typing Maths followed by a period.  The Intelli-sense feature displays a list of the available mathematical functions provided by the Cephes Mathematical Library. For example:

 Session.Output "The square root of 9 is " & Maths.sqrt(9)

 Session.Output "2^10 = " & Maths.pow(2,10)

q.
« Last Edit: October 01, 2014, 03:04:41 am by qwerty »

Aaron B

  • EA Administrator
  • EA User
  • *****
  • Posts: 941
  • Karma: +18/-0
    • View Profile
Re: Where is the scripting Maths library?
« Reply #2 on: October 01, 2014, 09:26:36 am »
Which edition of EA are you running?  The Maths object is not available in EA Corporate edition.

See "Math Support built into Script Engines" on the Compare Editions page:
http://www.sparxsystems.com/products/ea/compare-editions.html

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: Where is the scripting Maths library?
« Reply #3 on: October 01, 2014, 11:07:26 am »
OK, that restriction was not mentioned in the section of Help dealing with the Maths object. It is now, but it won't be seen until the next major release of EA.
Best Regards, Roy

EXploringEA

  • EA User
  • **
  • Posts: 172
  • Karma: +8/-0
    • View Profile
Re: Where is the scripting Maths library?
« Reply #4 on: October 01, 2014, 05:44:43 pm »
Thanks - was using Corporate edition and wasn't aware of restriction.  Good idea to mention in user guide as unlikely to go back and check sales info after the purchase.  However, I know with my own developments how easy is to miss something.

BTW: Tested with a ultimate and works fine.

So back to EXploringEA :)

EXploringEA - information, utilities and addins

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Where is the scripting Maths library?
« Reply #5 on: October 01, 2014, 05:50:59 pm »
Me too. And yes: would not harm to mention the restriction in the help.

q.