Returns the number of parameters passed to a routine.

Syntax

ARGCOUNT( )

Description

Use ARGCOUNT( ) to determine how many parameters, or arguments, have been passed to a routine. You may alter the behavior of the routine based on the number of parameters. If there are fewer parameters than expected, you may provide default values.

ARGCOUNT( ) returns 0 if no parameters are passed.

The function PCOUNT( ) is identical to ARGCOUNT( ). Neither function recognizes parameters passed to codeblocks. If called within a codeblock, the function will return the parameter information for the currently executing FUNCTION or PROCEDURE.