Tech Tip: Appending an Array Element in 2004
PRODUCT: 4D | VERSION: 2004 | PLATFORM: Mac & Win
Published On: September 9, 2004
Starting in 4D 2004, you can append an element to an array with only one line of code. A new command called APPEND TO ARRAY has been added to ease the process and reduce the amount of code that you have to write.
INSERT ELEMENT($myarray;Size of array($myarray)+1)
$myarray{Size of array($myarray)}:=$myvalue
can now be replaced with:
APPEND TO ARRAY($myarray;$myvalue)