Source language: Translate to:

Does Neobook have a math library?

General questions about NeoBook

Moderator: Neosoft Support

Does Neobook have a math library?

Postby steelweaver52 » Mon Aug 22, 2016 8:56 am

Hello!

I'm wondering if Neobook has a library of mathematical functions. Examples might be sin(), cos(), tan(), ATAN2(), min(), max(), round(), sqrt(), random()...you get the picture.

Thanks!

---Tom Nally, New Orleans
Tom Nally, New Orleans
steelweaver52
 
Posts: 6
Joined: Sun Apr 02, 2006 7:39 pm

Re: Does Neobook have a math library?

Postby Gaev » Mon Aug 22, 2016 12:22 pm

Tom Nally:
Examples might be sin(), cos(), tan(), ATAN2(), min(), max(), round(), sqrt(), random()


1) From the Help file for the Math command ...
Syntax:
Math "formula" "decimal places" "variable"

formula
A mathematical formula. The formula can include the following operators and functions: +, -, *, /, ^, Abs, Sin, Cos, Atan, Sqr, Sqrt, Round, Trunc.


2) Separately, NeoBook also provides a Random command

3) Please explain what kind of Min()/Max() results you need ... fields in Database Records ? ... elements in Arrayed Variables ? ... other ?
User avatar
Gaev
 
Posts: 3717
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: Does Neobook have a math library?

Postby steelweaver52 » Mon Aug 22, 2016 1:48 pm

Thanks, Gaev.

Usually, the arguments for min() and max() are a list of comma-separated items. (Or, as you suggested, it could be an array.)

But what would be most helpful would be for Neosoftware to publish a comprehensive list of all function available in the Neobook package, including math functions, string functions, financial functions, and any other kind.

I wouldn't expect Neobook to have all the functions of a computer algebra system. But if Neobook had the functions associated with most implementations of BASIC, it would certainly make it more useful to me.

Thanks again!

---Tom Nally, New Orleans
Tom Nally, New Orleans
steelweaver52
 
Posts: 6
Joined: Sun Apr 02, 2006 7:39 pm

Re: Does Neobook have a math library?

Postby Gaev » Mon Aug 22, 2016 2:51 pm

Tom Nally:

But what would be most helpful would be for Neosoftware to publish a comprehensive list of all function available in the Neobook package, including math functions, string functions, financial functions, and any other kind.

Apart from the previously mentioned Math and Random commands, take a look in the Help File at the chapter labelled Action Command Reference... there is a section called Strings and another called Variables.

There are no built in Financial Functions within NeoBook.

Usually, the arguments for min() and max() are a list of comma-separated items. (Or, as you suggested, it could be an array.)

If you are familiar with Javascript (or VBScript), you can develop your own functions that you can then Call from within any of your publications.

Another way to perform functions using Javascript/VBScript is to deploy BrowserExecScript.
User avatar
Gaev
 
Posts: 3717
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: Does Neobook have a math library?

Postby steelweaver52 » Tue Aug 23, 2016 5:25 am

Thanks again, Gaev.

After looking around, I think it would be accurate to say that Neobook's documentation provides no comprehensive list of native functions.

Regarding Javascript, however, are you saying that any Math Object or Math function available in this list (below) is also available in Neobook by calling a Javascript script?

http://www.w3schools.com/jsref/jsref_obj_math.asp

---Tom Nally
Tom Nally, New Orleans
steelweaver52
 
Posts: 6
Joined: Sun Apr 02, 2006 7:39 pm

Re: Does Neobook have a math library?

Postby Neosoft Support » Tue Aug 23, 2016 11:07 am

The help file topic titled "Action Command Reference" contains a list of actions commands supported by NeoBook's scripting language. The Math action can be used to perform basic calculations containing the following operators and functions: +, -, *, /, ^, Abs, Sin, Cos, Atan, Sqr, Sqrt, Round, Trunc. Parentheses and variables may also be used in formulas. For example:

Math "Cos(180)" "2" "[Result]"

There are also several math related plug-ins that may be helpful:

http://www.neosoftware.com/neobook/modules/plugins/singlefile.php?cid=5&lid=99

http://www.neosoftware.com/neobook/modules/plugins/singlefile.php?cid=15&lid=193

http://www.neosoftware.com/neobook/modules/plugins/singlefile.php?cid=5&lid=22
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: Does Neobook have a math library?

Postby Gaev » Tue Aug 23, 2016 12:24 pm

Tom Nally:

After looking around, I think it would be accurate to say that Neobook's documentation provides no comprehensive list of native functions.

If you are saying that such a list is not documented in a single page in the Help File, you are correct ... but note that the kind of users that are attracted to NeoBook (citizen developers vs. programmer types) do not look for such "helicopter views" of the capabilities of a product ... their needs are more along the lines of "how do I accomplish this particular task" that I have just encountered.

Regarding Javascript, however, are you saying that any Math Object or Math function available in this list (below) is also available in Neobook by calling a Javascript script?

http://www.w3schools.com/jsref/jsref_obj_math.asp

The short answer is Yes ... if you read the Help File section (Menu Functions >>> The Options Menu >>> Function Library), you will see that the Call command can be used to "call a Function" ... and Functions can be coded in Javascript, VBScript and NeoBook commands ... and there are facilities to read/write NeoBook variables from within these Functions.
User avatar
Gaev
 
Posts: 3717
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada


Return to General NeoBook Discussions

Who is online

Users browsing this forum: No registered users and 1 guest