KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Resetting the Size of Arrays to 0
PRODUCT: 4D | VERSION: 2003.3 | PLATFORM: Mac & Win
Published On: July 22, 2004

Versions: 6.8.x and 2003.x

Here is a simple method that allows you to reset the size of one or more arrays down to 0.

` Project Method: util_setarraysizetozero
` Syntax: util_setarraysizetozero (->array1;->array2;->array3; . . . ;->array[n])

C_POINTER(${1})

For ($i;1;Count parameters)
    If (Size of array(${$i}->)>0)
      DELETE ELEMENT(${$i}->;1;Size of array(${$i}->))
    End if
End for

Example method call:

util_setarraysizetozero (->array1;->array2;->array3;->array4)