dxSpreadSheetInitializeParamInfo(Integer,Integer,TdxSpreadSheetFunctionParamKindInfo) Method
Sets the size of the specified dynamic array of ExpressSpreadSheet-compatible function parameter types.
Declaration
procedure dxSpreadSheetInitializeParamInfo(const ACount: Integer; var AParamCount: Integer; var AParamKind: TdxSpreadSheetFunctionParamKindInfo);
Parameters
Name | Type |
---|---|
ACount | Integer |
AParamCount | Integer |
AParamKind | TdxSpreadSheetFunctionParamKindInfo |
Remarks
Call this global procedure to initialize the list of parameter types that your custom function implementation requires. The dxSpreadSheetInitializeParamInfo procedure allocates sufficient memory for storing a number of function parameter types passed as the ACount parameter within the dynamic array of parameter types passed as the ParamKind var parameter. Additionally, the procedure returns the number of stored parameters as the AParamCount var parameter specifically for use in implementations of the function syntax specification procedure. The following code example shows how to call the dxSpreadSheetInitializeParamInfo global procedure to implement the custom ExpressSpreadSheet-compatible function’s syntax as a TdxSpreadSheetFunctionParamInfo procedure:
procedure fpiTriangleArea(var AParamCount: Integer; var AParamKind: TdxSpreadSheetFunctionParamKindInfo);
begin
dxSpreadSheetInitializeParamInfo(3, AParamCount, AParamKind); // Allocates memory for storing three parameter types within the AParamKind array
// All three obligatory parameters accepted by the custom TriangleArea function are single numeric values
AParamKind[0] := fpkValue;
AParamKind[1] := fpkValue;
AParamKind[2] := fpkValue;
end;
Refer to the How to Create Custom Functions topic for additional information.
Note
All built-in ExpressSpreadSheet-compatible function implementations call the dxSpreadSheetInitializeParamInfo global function internally in their syntax specification routines.