Function : Formula

NSFFormulaCompile - Compiles a formula into binary form.
----------------------------------------------------------------------------------------------------------

#include <nsfsearc.h>

STATUS LNPUBLIC NSFFormulaCompile(
char far *FormulaName,
WORD FormulaNameLength,
const char far *FormulaText,
WORD FormulaTextLength,
FORMULAHANDLE far *rethFormula,
WORD far *retFormulaLength,
STATUS far *retCompileError,
WORD far *retCompileErrorLine,
WORD far *retCompileErrorColumn,
WORD far *retCompileErrorOffset,
WORD far *retCompileErrorLength
);

Description :

This function accepts a LMBCS string containing a formula and translates the formula into binary form. Functions that take compiled formulas as parameters include NSFSearch and NSFComputeStart.

After you use the compiled formula (returned in argument 5) you must deallocate the buffer that holds the formula. Do this by calling OSMemFree and passing it the FORMULAHANDLE.


Parameters :

Sample Usage :


sError = NSFFormulaCompile( NULL,
                           0,
                           szSelFormula,
                           strlen(szSelFormula),
                           &hSelFormula,
                           &wSelFormulaLen,
                           &wdc, &wdc, &wdc,
                           &wdc, &wdc );


See Also :

OSMemFree
----------------------------------------------------------------------------------------------------------