I use User Defined Types a lot these days, but I'm very disappointed of the lack of ability for a UDT to accept arrays. Another disappointment is the inability to preserve multidimensional arrays.
Let's say we want to make a tabbed program like a browser. Hmm, we switch tabs, but we want to run the same routine, but with different values. Well global or shared multi-dim arrays would allow use to do so... a$(1, n) ,a$(2, n), but if we needed to increase or decrease the array size(s), we would need a make a subroutine. That's doable enough, but it's a shame _Preserve doesn't work with multi-dims. (I use _Preserve on single-dim arrays extensively, and it's very much appreciated). Now a different route is we make everything universal using UDTs and pass those and any needed single-dim arrays to the sub calls. No need for global/shared. We still have two tabs that need to remember different variable values, and now the only way to accomplish this is a memory subroutine when switching tabs. It would either have to use _Mem or contain its own equivalent arrays to memorize the values assigned to each variable in both tabs. Upon switching, it would repopulate all the arrays and UDT variables to the active tab, while retaining the other tab values for switching back. Without using the _mem feature, this would best be done with local single-dim arrays, unless the program uses multi-dim arrays when, again, we'd have that extra preserve subroutine to make for the missing multi-dim _Preserve function. I figure we could name this sub the: MyPITA_Routine
Just sayin'
Pete
Let's say we want to make a tabbed program like a browser. Hmm, we switch tabs, but we want to run the same routine, but with different values. Well global or shared multi-dim arrays would allow use to do so... a$(1, n) ,a$(2, n), but if we needed to increase or decrease the array size(s), we would need a make a subroutine. That's doable enough, but it's a shame _Preserve doesn't work with multi-dims. (I use _Preserve on single-dim arrays extensively, and it's very much appreciated). Now a different route is we make everything universal using UDTs and pass those and any needed single-dim arrays to the sub calls. No need for global/shared. We still have two tabs that need to remember different variable values, and now the only way to accomplish this is a memory subroutine when switching tabs. It would either have to use _Mem or contain its own equivalent arrays to memorize the values assigned to each variable in both tabs. Upon switching, it would repopulate all the arrays and UDT variables to the active tab, while retaining the other tab values for switching back. Without using the _mem feature, this would best be done with local single-dim arrays, unless the program uses multi-dim arrays when, again, we'd have that extra preserve subroutine to make for the missing multi-dim _Preserve function. I figure we could name this sub the: MyPITA_Routine
Just sayin'
Pete

