uCalc

 

See Also: ucDefine

 

This one function encapsulates all of uCalc's functionality.

 

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 FMP.  You will, however, find the list of command constants that you can use in the include file.  For details on how to use them, refer to the uCalc Language Builder help file (available separately from uCalc FMP).  Commands that are useful to uCalc FMP, such as uc_Define, uc_DefineSyntax, uc_EvalStr, uc_Parse, etc... are employed in the include file in order to create such functions as ucDefine, ucDefineSyntax, ucEvalStr, ucParse, etc...

 

TextArg

Optional.  For commands that require passing a string argument to uCalc, this second argument is generally the one to use for that.  The commands mentioned as examples in the previous paragraph all use this argument.  Generally a pointer to the string is passed.  However, the details vary from compiler to compiler.

 

Misc1, Misc2

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

 

ReturnPtr

Optional.  Typically functions that require returning a value of 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.  Functions defined in the include file, such as ucEval, ucParamDbl, etc... use 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 the thread argument.  In some cases, where the thread argument is of no consequence, this last parameter is used instead for miscellaneous purposes other than thread.

 

 

Remarks

 

All arguments are 32-bit values.  These can be Long, DWORD, pointer addresses, etc... depending on the command and the compiler.

 

For functions that return a string value instead of a 32-bit value, use uCalcStr.

 

It is also defined as a "built-in" function that even end-users can employ as well.

 

 

New or Enhanced