uCalc

uCalcStr

 

See Also: ucDefine

 

This one function encapsulates all of uCalc's functionality.  Routines in the header / include file, such ucEval, ucDefineFunction, ucParse, etc., are constructed by placing a special call to uCalc().  Even routines such as ucEvaluate, ucParam, ucReturn, etc., which are directly exported from the DLL for greater speed, can also be defined by placing a call to uCalc().  Typical users will generally not need to call uCalc() directly.  However, occasionally a solution may require its use.

 

uCalc(Command [, TextArg [, Misc1 [, [Misc2 [, ReturnPtr [, tHandle]]]]])

-or-

uCalcStr(Command [, TextArg [, Misc1 [, [Misc2 [, ReturnPtr [, tHandle]]]]])

 

Parameters

Command

Required.  Most commands fall beyond the scope of uCalc Fast Math Parser.  You will, however, find the list of command constants that you can use in the uCalc header / include file for your compiler.  For details on how to use them, refer to the uCalc Language Builder help file (available separately from uCalc FMP), or request technical support if you see an interesting command for which you need further details.

 

TextArg

Optional.  For commands that require passing a string argument to uCalc, this second argument is generally the one to use for that.  Routines such as ucEval, ucDefineFunction, ucParse, and more use this argument.  If the call does not require a string, you may pass a 0 or empty quotes "".  The details of which of the two to pass depends on the compiler you are using.

 

Misc1, Misc2

Optional.  These arguments are used by some commands that require them.

 

ReturnPtr

Optional.  Typically, functions that require returning a value of a data type other than a 32-bit number can do this by passing the pointer of a variable of a given type, and uCalc will store the result at that address.  ucEval() uses this.  For some commands, this 5th argument is used instead for miscellaneous purposes other than this.

 

tHandle

Optional.  Typically, this last parameter is reserved for passing a thread handle.  In some cases, where the thread argument is of no consequence, this last parameter is used instead for miscellaneous purposes other than passing a thread handle.

 

Remarks

 

 

New or enhanced in version 2.9+