Table of Contents

TUserDefinedFunction.CheckParameters Method

Checks that the parameter array has the expected number of arguments, and that no one is an Error. If any argument is an error it is returned in ResultError, since the default in Excel is to stop processing arguments in a function when one is an error.

Syntax

Unit: FlexCel.Core

class function TUserDefinedFunction.CheckParameters(const parameters: TArray<TFormulaValue>; const expectedCount: Integer; out ResultError: TFlxFormulaErrorValue): Boolean; static;

Parameters

<-> Parameter Type Description
const parameters TArray<​TFormula​Value> Array of parameters to check.
const expectedCount Integer Number of parameters expected. If this number is variable, specify -1 here.
out ResultError TFlxFormulaError​Value Returns the error in the parameters. This parameter is only valid if this function returns false.

Returns

True if all parameters are correct, false otherwise.

See also