IsEmpty( ** array[], ref integer arraySize ) return boolean

** = all data types

This function is used to check if an array is empty or not.
If it is empty, the arraySize variable will be equal to zero, otherwise it will contains the number of entries that compose the specified array.

It allows to replace the usual array handling codes like :

integer li_i
integer li_size
li_size = upperbound( array[] )
if li_size < 1 then return -1
for li_i = 1 to li_size
...
next

by a more concise code:

integer li_i
integer li_limit

if #.IsEmpty( array[], li_size ) = true then return -1
for li_i = 1 to li_size 
...
next


Last edited May 27, 2015 at 10:48 AM by domangep, version 4