KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Double-dereferencing pointers while using APPEND TO ARRAY
PRODUCT: 4D | VERSION: 2004 | PLATFORM: Mac & Win
Published On: February 20, 2008

The APPEND TO ARRAY command does not support a double-dereference while in compiled mode; however double-dereferences in interpreted mode do work. For example:

  ` Works Interpreted but not Compiled!
APPEND TO ARRAY(myPtr_app->{$i}->;"This fails when compiled")


Alternatively the following example shows how to get consistent behavior in both compiled and interpreted:

  ` Works both Compiled and Interpreted!
$myPtr_p:=$myPtr_app->{$i}
APPEND TO ARRAY($myPtr_p->;"This works when compiled")