Skip to main content

TdxSpreadSheetFunctionInfo.Proc Field

Stores a reference (in Delphi) or pointer (in C++Builder) to the routine that implements the function signature.

Declaration

Proc: TdxSpreadSheetFunction

Field Value

Type
TdxSpreadSheetFunction

Remarks

The function signature is ready for use in formula expressions when it has both the implementation and syntax specification routines assigned to the Proc and ParamInfo fields, respectively.

A function implementation routine:

  • Checks if accepted parameters are valid.

  • Extracts parameters from a function call token (AParams) in a parsed formula expression.

  • Performs all necessary operations on extracted parameters.

  • Returns one or more results according to the ResultKind field value (Sender).

Refer to the TdxSpreadSheetFunction procedural type description for details.

The ecName error occurs if a parsed expression refers to the function signature that has no actual implementation, that is, the Proc field value is nil (in Delphi) or NULL/nullptr (in C++Builder). The IsValid function returns False in such case; otherwise – True.

The TdxSpreadSheetFunctionsRepository.Add procedure uses the AProc parameter value to initialize the Proc field of a newly created function signature.

See Also