2.1.25.27 GetOCMathFunctionList


Description

Get the list of Origin C functions that can be used in LabTalk for calculations

Syntax

int GetOCMathFunctionList( vector<string> * psaNames, vector<string> * psaDescriptions, vector<uint> * pvuNumArgs, vector<string> * psaInsert )

Parameters

psaNames
[output] array for the function names and arguments, like sin(x)
psaDescriptions
[output] array for each function's descriptions
pvuNumArgs
[output] array for each function's argument count, most function will be 1
psaInsert
[output] array for each function's string form that is suitable for insertion into formula edit box, like sin()

Return

number of functions found, -1 if any of the argument is invalid

Examples

EX1

void GetOCMathFunctionList_ex1()
{
    vector<string> vsNames, vsDesc, vsIns;
    vector<uint> vunArgs;
    int nCount = GetOCMathFunctionList(&vsNames, &vsDesc, &vunArgs, &vsIns);
    if(nCount > 0)
    {
        printf("Function\tDescription\tArg\tInsert Form\n");
        for(int ii = 0; ii < nCount; ii++)
            printf("%s\t%s\t%d\t%s\n", vsNames[ii], vsDesc[ii], vunArgs[ii], vsIns[ii]);
    }            
}

Remark

See Also

Header to Include

origin.h

Reference