Other
Compilers
Specific provisions were made for compilers such as C++ Builder, C#, Delphi, PB, VB (classic and .NET), and VC++. However general provisions were made for other Windows-based compilers as well. In some cases, you should be able to use the header/include file for one of the above compilers as a pattern for creating a header/include file for your other compiler. The following routines are exported from ucFMP296.DLL: uCalc(), ucEvaluateExt(), ucEvaluateDbl(),ucExprThread(),ucParamCount(), ucParamDbl(), ucParamExt(), ucParamLng(), ucParamHandle(), ucParamStr(), ucParamStrB(), ucReturnExt(), ucReturnDbl(), ucReturnStr(), ucStrReturn(),ucSetVariableValueDbl (),ucSetVariableValueExt(), and ucSetVariableValueStr(). A wrapper DLL named uCalcWrp.dll exports some of the above plus other routines described in this help file. These exports are useful for programming environments such as LabVIEW. (Other compilers do not need uCalcWrp.dll).
The uCalcWrp.dll, along with the source code that was used to compile it, with the PowerBASIC compiler, are found in the ucFMP296/Other directory.
Routines exported from uCalcWrp.dll are:
Function uCalc(ByVal ucCommand As Long, Optional ByVal TextArg As Dword, ByVal MiscArg1 As Dword, ByVal MiscArg2 As Dword, ByVal ReturnPtr As Dword, ByVal t As Dword) As Dword
Function uCalcStr(ByVal ucCommand As Long, Optional ByVal TextArg As Dword, ByVal MiscArg1 As Dword, ByVal MiscArg2 As Dword, ByVal ReturnPtr As Dword, ByVal t As Dword) As Dword
Function ucAddr(ByVal AddressIndex As Long) As Dword
Function ucDefine(Definition As Asciiz, Optional ByVal Arg1 As Dword, ByVal Arg2 As Dword, ByVal Arg3 As Dword, ByVal t As Dword) As Dword
Function ucDefineConstant(Definition As Asciiz, Optional ByVal t As Dword) As Dword
Function ucDefineFunction(Definition As String, Optional ByVal ItemAddress As Dword, ByVal t As Dword) As Dword
Function ucDefineOperator(Definition As String, Optional ByVal ItemAddress As Dword, ByVal t As Dword) As Dword
Function ucDefineSyntax(Definition As Asciiz, Optional ByVal Rank As Dword, ByVal t As Dword) As Dword
Function ucDefineVariable(Definition As Asciiz, Optional ByVal ItemAddress As Dword, ByVal t As Dword) As Dword
Function ucErrLocation(ByVal t As Dword) As Long
Function ucErrSymbol(ByVal t As Dword) As Dword
Function ucError(Optional ByVal t As Dword) As Long
Function ucErrorMessage(Optional ByVal ErrNum As Dword, ByVal t As Dword) As Dword
Function ucEval(Expr As Asciiz, Optional ByVal t As Dword) As Extended
Function ucEvalStr(Expr As Asciiz, Optional ByVal ExprType As Dword, ByVal t As Dword) As Dword
Function ucEvaluate(ByVal Expr As Dword) As Extended
Function ucEvaluateDbl(ByVal Expr As Dword) As Double
Function ucEvaluateExt(ByVal Expr As Dword) As Extended
Function ucEvaluateStr(ByVal Item As Dword) As Dword
Function ucExpand(Expr As Asciiz, Optional ByVal t As Dword) As Dword
Function ucExprThread(ByVal Expr As Dword) As Dword
Function ucGetCodeBlock(Expr As String, ByRef i As Long, Optional ByVal ucOption As Long, Optional ByVal t As Dword) As Dword
Function ucGetError(Optional ByVal t As Dword) As Long
Function ucGetExpr(Optional t As Dword) As Dword
Function ucGetItemHandle(SymbolName As Asciiz, Optional ByVal ucProperties As Dword, ByVal t As Dword) As Dword
Function ucGetNextItem(Expr As String, ByRef i As Long, Optional ByVal ucOption As Long, Optional ByVal t As Dword) As Dword
Function ucGetSymbol(Optional t As Dword) As Dword
Function ucGetTrigMode() As Long
Function ucInitialize() As Dword
Function ucInterpret(Expr As Asciiz, Optional ByVal ExprType As Dword, ByVal t As Dword) As Dword
Function ucLicense(ByVal LicenseOption As Long, Optional ByVal L1 As Dword, ByVal L2 As Dword, ByVal L3 As Dword) As Long
Function ucNewThread(Optional ByVal ParentThread As Dword) As Dword
Function ucParam(ByVal Expr As Dword, ByVal pIndex As Long) As Extended
Function ucParamCount(ByVal Expr As Dword) As Long
Function ucParamDbl(ByVal Expr As Dword, ByVal pIndex As Long) As Double
Function ucParamExt(ByVal Expr As Dword, ByVal pIndex As Long) As Extended
Function ucParamHandle(ByVal Expr As Dword, ByVal pIndex As Long) As Dword
Function ucParamStr(ByVal Expr As Dword, ByVal pIndex As Long) As Dword
Function ucParse(Expr As Asciiz, Optional ByVal ExprType As Dword, ByVal t As Dword) As Dword
Function ucRaiseError(ByVal Expr As Dword, ByVal ErrorNum As Long) As Long
Function ucReleaseItem(ByVal ucItem As Dword) As Long
Function ucSetErrMsg(ByVal ErrIndex As Long, ErrMessage As Asciiz, Optional ByVal t As Dword) As Long
Function ucSetError(ByVal ErrorNum As Long, Optional ByVal t As Dword) As Long
Function ucSetErrorNumber(ByVal ErrorNumber As Long, Optional ByVal t As Dword) As Long
Function ucStrReturnB(ByVal TextPtr As Dword) As Dword
Sub ucRaiseErrorMessage(ByVal Expr As Dword, ErrMessage As String)
Sub ucReturnDbl(ByVal Expr As Dword, ByVal ReturnValue As Double)
Sub ucReturnExt(ByVal Expr As Dword, ByVal ReturnValue As Extended)
Sub ucReturnStr(ByVal Expr As Dword, ByRef ReturnValue As Asciiz)
Sub ucSetTrigMode(ByVal TrigMode As Long)
Sub ucSetVariableValueDbl(ByVal Item As Dword, ByVal NewValue As Double)
Sub ucSetVariableValueExt(ByVal Item As Dword, ByVal NewValue As Extended)
Sub ucSetVariableValueStr(ByVal Item As Dword, ByRef NewValue As Asciiz)
Definitions
Extended
Extended Precision; or long double type (80 bits).
Sub
Sub procedure that does not return a value; function which returns void (C++); a procedure (Delphi).
Dword
Unsigned long integer. Functions that return a Dword are returning a pointer to a string for use with the C++ char* type, or Delphi's PChar type. As a function argument, Dword is interchangeable with Long.
Asciiz
String type for function arguments. This string type allows compatibility with VB's OLE string type, C++'s char* string type, and Delphi's AnsiString type.
ByVal
Argument passed by value. Most arguments should be declared as being passed by value, by most compilers.
ByRef
Argument passed by reference. The few arguments that are specifically passed by reference belong to a function that is not to be used directly. Some compilers may require all strings to be passed by reference.