JavascriptEngineMBS - Function without parameters

When my script calls a function without parameters, the function returns the following value: function (){ [native code]}

Example 1: (Doesn’t work)

CJSEngine.RegisterFunction ("GetNumber", AddressOf JS_GetNumber ,0, nil)

Script:

Value = 0;
Value = GetNumber;

Example 2: (Doesn’t work)

CJSEngine.RegisterFunction ("GetNumber", AddressOf JS_GetNumber ,1, nil)

Script:

Value = 0;
Value = GetNumber;

Example 2: (works)

CJSEngine.RegisterFunction ("GetNumber", AddressOf JS_GetNumber ,1, nil)

Script:

Value = 0;
Value = GetNumber("AnUnusedParameter");

In this case I’ve added to GetNumber and JS_GetNumber functions a parameter to pass.

Am I performing a wrong manipulation or is this correct?

In Example 1 you register the function and then you assign the function itself to Value.
You do not call the function!

In Example 2 below you have brackets to invoke the function and pass a parameters.

so please use brackets.