info("parameters")

The info(“parameters”) function returns the number of parameters passed to a subroutine.


Description

This function returns the number of parameters passed to a subroutine.

This example shows you you can write a subroutine that will add up a list of numbers passed to it.

// SumNumbers
//
// Usage: call("","SumNumbers",n1,n2,n3, ... ,n999)
//
local sum
sum=0
for n,1,info("parameters")
    sum=sum+parameter(n)
endloop
functionvalue sum

Now this subroutine can be used in any formula to add up a list of numbers.

call("","SumNumbers",12,20,16) ☞ 48
call("","SumNumbers",6,5,4,3,2,1) ☞ 21

See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0