KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Appending an Array Element in 2004
PRODUCT: 4D | VERSION: 2004 | PLATFORM: Mac & Win
Published On: September 9, 2004
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

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)