the
paramCount
paramCount
()
if the paramCount < 3 then ¬ put "I need at least three arguments."
The paramCount
function returns the number of parameters passed to the currently executing handler.
The following example multiplies the arguments passed to it, regardless of how many there are. In other words, it is functionally equivalent to the product
function:
function theProduct put 1 into total repeat with i = 1 to the paramCount multiply total by param(i) end repeat return total end theProduct