Once I have created away, I use clear variable and not array text($t;0) Regards Chuck ------------------------------------------------------------------------------------------------ Chuck Miller Voice: (617) 739-0306 Informed Solutions, Inc. Fax: (617) 232-1064 mailto:cjmiller<AT SIGN>informed-solutions.com Brookline, MA 02446 USA Registered 4D Developer Providers of 4D and Sybase connectivity http://www.informed-solutions.com ------------------------------------------------------------------------------------------------
> On Aug 14, 2016, at 3:18 AM, Kirk Brooks <[email protected]> wrote: > > Chip, > To clear {0} you either need to do it explicitly (with aArray{0}:=0 or "" > etc) or call Clear Variable. > > I've also seen cases where calling something like > > array longint(aArray;0) > array longint(aArray;4) > > resulted in the array elements retaining their value. That was a long time > ago but the issue stuck with me and I don't know if it still happens. But > {0} is treated specially in 4D so the array declarations are by default > declaring it and as we know simply declaring a variable doesn't affect the > existing value assuming it's the same type. > > In the case you mention do you really need process arrays? If you can use > local arrays (and pass pointers to them to subsidiary methods) you are > assured fresh, clean arrays each time the method executes. ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

