Returns the number of items in an array that aren't null
i.e.
Dim a(10)
a(5)=1
b=ArrayItems()
;b=1
ArrayItems()
-
- Enthusiast
- Posts: 731
- Joined: Wed Apr 21, 2004 7:12 pm
ArrayItems()
~I see one problem with your reasoning: the fact is thats not a chicken~
I don't think, this is useful. It isn't used often, so it isn't needed to be
added to PB
You could try it with this Procedure:
cya,
leo
P.S.:Sorry for my bad english, i'm german
added to PB

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())
leo
P.S.:Sorry for my bad english, i'm german
