Re: How to pass a 2-D array into a function?



Ain't it?!  :-)

I keep an arsenal of functions for adding items to an array, returning an index in an array etc. to save me making myself dizzy by having to loop through arrays all the time.

As I understand it (and I may be guilty of spouting misinformation again here) Delphi has native methods to handle things like the above or allowing the easy deletion of an element in the middle of an array without having to load everything into a new array. VB.NET doesn't appear to have improved on arrays at all (other than eliminating 1 based arrays and allowing for one line declaration like Dim X() as long = (1,2,3,4) ... or something along those lines. While I guess using collections is feasible in some circumstances it's staggering that VB.NET still seems to fall short on something so fundamental. Oh... and there's also ArrayLists in .NET -- something I haven't looked at so maybe I should get off my high horse.


Michael C wrote:
"Gman" <nah> wrote in message news:%239xRhgZ6FHA.3232@xxxxxxxxxxxxxxxxxxxxxxx

If it's of use to you I've pasted a function that I've used on occasion that returns an array's dimension.


Don't ya just love vb when a function like that is required just to get the dimensions of an array :-)

Michael


.



Relevant Pages

  • Re: fast stable sort
    ... For fastest load, at expense of slower sort, you ask the operating ... and you memory-map the file directly into that array. ... memory of your big array. ... possible to assure locality of reference and thus avoid thrashing ...
    (comp.programming)
  • Re: How can I create a 2D ArrayList? String usually.
    ... I basically would like a 2 column array or whatever that will be static, ... in values won't change after I load them and I would like to fairly quickly ... > Array.IndexOf is probably going to yield linear performance as you add ... you might be better off using hashtables. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: problem with [array get ...] -> file -> string -> [array set ...]
    ... I'm pulling my hair out trying to save and load data to a file. ... got a large array (probably filled with all sorts of "special" ... puts "saving test to test.save" ...
    (comp.lang.tcl)
  • Re: Skipping bytes while reading a binary file?
    ... numbers where the first 32 bits of the file is the real component, ... I'd like to be able to read in just the real components, load them ... time-consuming are the simple assignment statements in the ... but at some point I'll need to split this array ...
    (comp.lang.python)
  • Skipping bytes while reading a binary file?
    ... numbers where the first 32 bits of the file is the real component, ... I'd like to be able to read in just the real components, load them ... of the "for CurrentColumn in range" loop, ... but at some point I'll need to split this array ...
    (comp.lang.python)