ArrayItems()
Posted: Wed Mar 23, 2005 12:30 am
Returns the number of items in an array that aren't null
i.e.
Dim a(10)
a(5)=1
b=ArrayItems()
;b=1
i.e.
Dim a(10)
a(5)=1
b=ArrayItems()
;b=1
Code: Select all
;
; 25.3.2005
; Array Items
; By leo1991 in English Forum
;
Procedure ArrayItems(*Array.LONG)
*Array - 8
Size = *Array\l - 1
*Array + 8
RetVal.l
For I = 0 To Size
If *Array\l
RetVal + 1
EndIf
*Array + 4
Next
ProcedureReturn RetVal
EndProcedure
Dim a(10)
a(5) = 1
a(7) = 100
Debug ArrayItems(@a())