DADiSP Worksheet Functions > Function Categories > ActiveX > Automation Server > EVALUATE

 

EVALUATE

Purpose:

Evaluates a command string in DADiSP’s ActiveX Automation Server and returns the result as a string.

Syntax:

[out] BSTR result = Evaluate([in] BSTR "command")

"command"

-

A string, any valid expression.

Returns:

A string. The result or error message.

Example:

Visual Basic Example:

 

Dim DADiSP as Object

Dim str as String

 

’’’ Connect to DADiSP

Set DADiSP = CreateObject("dadisp.application")

 

’’’ Create a 2 Window Worksheet without prompting

Call DADiSP.Execute("Newworksheet(2, 0)")

 

’’’ Generate 3x3 random array, return result as a string

str = DADiSP.Evaluate("rand(3)")

 

’’’ show result

MsgBox(str)

 

 

Starts DADiSP as an ActiveX Automation server, creates a 2 Window Worksheet, generates a 3x3 random array and returns the result as a string.

Remarks:

Any DADiSP command can be executed. Multiple statements are separated by semicolons.

 

EVALUATE evaluates the command string and always returns the result or errors as a string.

 

See CALCULATE to evaluate a command string with optional arguments.

 

See EXECUTE to evaluate a command string in the current Worksheet without returning the result.

 

See GETDATA to return data from a command, Window or variable.

See Also:

CALCULATE

EVAL

EXECUTE

GETDATA

GETSERIES

PUTDATA

PUTSERIES

QUIT

VISIBLE