HB_AParams

HB_AParams

Returns an array containing values of all parameters passed to a function, method or procedure.

Syntax

      HB_AParams() --> <aValues>

Returns

<aValues> : An array with values of all parameters passed

Description

Function HB_AParams() provides a convenient way of collecting all parameters passed to a function, method or procedure with one function call in an array.

Example

      TestApars( 'par1', 'par2', '//par3', 'par4', 'par5' )
      ...
      PROCEDURE TestApars()
         LOCAL aParams := HB_AParams()
         FOR nParamNo := 1 TO LEN( aParams )
             ? nParamNo, aParams[ nParamNo ]
                NEXT
      RETURN

      Result :
      ----------
      1 par1
      2 par2
      3 //par3
      4 par4
      5 par5

See also

PCount(), HB_PValue()

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s