jbrohan Posted November 27, 2005 Report Share Posted November 27, 2005 Resize 2D array Inputs an array as Variants and outputs Variant Numeric String and Boolean arrays containing the original and expanded or contracted to the requested size. I would be interested in the comments of LV people as to whether this is a viable approach to polymorphism. The input array is converted to the output types at some considerable computational effort. However in a user interface situation programmer convenience (IMHO) greatly outweighs the time lost in execution.Download File:post-230-1133113101.zip Quote Link to comment
tnt Posted November 29, 2005 Report Share Posted November 29, 2005 Resize 2D arrayInputs an array as Variants and outputs Variant Numeric String and Boolean arrays containing the original and expanded or contracted to the requested size. I would be interested in the comments of LV people as to whether this is a viable approach to polymorphism. The input array is converted to the output types at some considerable computational effort. However in a user interface situation programmer convenience (IMHO) greatly outweighs the time lost in execution.Download File:post-230-1133113101.zip hi, I guess you already know that you need LV Pro to create "real" polymorphic VI's and that this is a way to do something similar. This solutions seems to be rather memory-intensive, especially when using large arrays, because you create 4 different arrays out of 1 variant array. About your implementation:your performance/readability will improve if you would use the "Get TDEnum from Data" from the OpenG-toolkit. It just gives you the datatype of the variant. I haven't had the time yet to inspect what you are doing in the remove trailingzeros, but I know that when using a general expression like e.g. 0*$ and then removing the last point if the number appears to be an integer results in much more readable code. GrtZ, tnt Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.