If this is your first visit to our forums, welcome!
To wrap up this multi-part series about arrays and structs I'll highlight a few key areas and answer some questions that came up. [URL="http://support.dataaccess.com/forums/blog.php?b=26"]Part I[/URL] starts by showing the basic use of structs and arrays, how they can be used together and as parameter & return types. [URL="http://support.dataaccess.com/forums/blog.php?b=27"]Part II[/URL] discusses how sorting and searching works with native arrays. ...
In [URL="http://support.dataaccess.com/forums/blog.php?b=29"]Part III[/URL] we discovered that arrays work great together with struct types, and that native arrays are clearly much easier to use than the old Array class, but what about performance? A simple test shows that the basic use of native arrays (reading/writing elements) compare very favorably against the old-school Array class. In fact, native arrays are a little faster. Your mileage may vary depending on the data type as well ...
In [URL="http://support.dataaccess.com/forums/blog.php?b=27"]Part II[/URL] of this multi-part series we discussed sorting and searching arrays, and we also mentioned that multi-dimensional arrays aren't really suited for sorting and searching, we'll dig into that a little deeper here and see how a struct type is often a better solution. [B]Multi-dimensional Arrays[/B] Despite what the documentation may seem to suggest, you really cannot sort multi-dimensional arrays. ...
In [URL="http://support.dataaccess.com/forums/blog.php?b=26"]Part I[/URL] we were just getting warmed up and started looking at the basics of arrays and struct types. Now things are about to get more complicated as we dig in deeper. [B]Sorting Arrays[/B] If you have [I]Integer[] myArray[/I] for example, then sorting is very simple and straightforward. You simply do [I]Move (SortArray(myArray)) to myArray[/I], and you're done. The runtime takes care of all the magic ...
Native arrays have been around in Visual DataFlex for years now, it's obvious that native array types are preferred by far over the old Array class, but just what are the differences? For one, with native array types you can create local array variables without resorting to creating an object. That also means you can use array types as parameter types and return types, and the data is carried across method calls far easier than array objects. You also never have to worry about destroying an object, ...
Updated 3-Sep-2009 at 06:48 PM by Sonny Falk