ASUBSCRIPT()

From Lianjapedia
Revision as of 09:04, 7 December 2012 by Yvonne.milne (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Purpose

Function to return the row or column number of an array element from the element number

Syntax

ASUBSCRIPT(<array>, <expN1> ,<expN2>)

See Also

AADD(), AAVERAGE(), ACOPY(), ADEL(), ADESC(), ADIR(), AELEMENT(), AFIELDS(), AFILL(), AINS(), ALEN(), AMAX(), AMIN(), APPEND FROM ARRAY, ARRAY(), ASCAN(), ASIZE(), ASORT(), ASTORE(), ASTRING(), ASUM(), COPY TO ARRAY, DECLARE, DIMENSION, GATHER, IN_ARRAY(), IS_ARRAY(), LOCAL, PRIVATE, PUBLIC, RELEASE, RESTORE, SAVE, SCATTER

Description

The ASUBSCRIPT() function returns the array <array> row or column element reference for a specified array element. The parameter <expN1> defines the array element index position within the array. The parameter <expN2> identifies whether the array's row or column reference should be returned. If <expN2> is a 1, the row number is returned. If <expN2> is a 2, the column number is returned.

Example

use state.rdb
private aRECORDS[50,fcount()]
copy to array aRECORDS
nELEM = ascan(aRECORDS,'California')
? asubscript(aRECORDS,nELEM,1)
         6