rmarles
12th April 2004, 22:41
I have an array of type LONG.
Is there a quick way to initialize the entire array, perhaps a cool 3/4GL function of initializing the entire array so it's empty or "zero"?
Thanks
NPRao
13th April 2004, 03:30
You can use - set.mem() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_memory_operations_set_mem) and initialize the array some value or 0.
To free it you can use - free.mem() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_memory_operations_free_mem) but the you have to allocate memory to use it again.
rmarles
13th April 2004, 15:23
NPRao,
Sweet - Thanks - with some tweaking I managed to get the source to use alloc.mem & free.mem.
This also allowed me to declare the array in such a way so that if I have to modify it's size, I only have to change constants defined at the beginning of the program script (making it easier for non developers to restructure the elements)
Thanks again.