ALen Function (FoxArray, Long) | |
Returns the number of elements, rows, or columns in an array.
Namespace:
XSharp.VFP
Assembly:
XSharp.VFP (in XSharp.VFP.dll) Version: 2.21
Syntax FUNCTION ALen(
a AS FOXARRAY,
nArrayAttribute AS LONG
) AS DWORD
public static uint ALen(
FoxArray a,
int nArrayAttribute
)
Request Example
View SourceParameters
- a
- Type: FoxArray
- nArrayAttribute
- Type: Long
Determines whether ALEN( ) returns the number of elements, rows or columns in the array according to the following values for nArrayAttribute:
0
Returns the number of elements in the array. Omitting nArrayAttribute is identical to specifying 0.
1
Returns the number of rows in the array.
2
Returns the number of columns in the array. If the array is a one-dimensional array, ALEN( ) returns 0 (no columns).
Return Value
Type:
DWord
Numeric
Examples 1CLEAR
2=AFONT(gaFontArray)
3gnNumFonts= ALEN(gaFontArray)
4IF gnNumFonts > 10
5gnNumFonts = 10
6ENDIF
7FOR nCount = 1 TO gnNumFonts
8? ALLTRIM(gaFontArray(nCount))
9?? ' This is an example of ' ;
10+ ALLTRIM(gaFontArray(nCount)) FONT gaFontArray(nCount), 8
11ENDFOR
See Also