realbasic-nug
[Top] [All Lists]

Re: When not to use array's

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: When not to use array's
From: William Squires <wsquires at satx dot rr dot com>
Date: Wed, 30 Mar 2005 23:20:48 -0600
Cc:
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <1112223474 dot 12363 dot 63 dot camel at kc dot lumensoftware dot com>

On Mar 30, 2005, at 4:57 PM, Bill Cavalieri wrote:

I've been writing declares around some of the libc libraries, and in
this case will be getting all the users out of the sytem (getpwent).

btw I'll be releasing the classes under the lgpl license, when RB2005 is
out.  Found it too difficult to write declares for Linux, from windows,
in a matter where I would want to receive updates from the community.
How's that for a run on sentence ;)

For this application, I will need to be loading up to 5000 items in a 2
dimensional array.  Well 5000 in first dimension, 7 items per in 2nd
(35,000).... then parsing it and /proc out into a table (using Einhugurs
grid)

Seems like a singly-dimensioned array of 7-ary trees would be better (a "7-ary" tree being one whose nodes have 0-7 leaf nodes, as opposed to a 2-ary (binary) tree.) Note that a 1-ary tree is just a linked-list :) That way, if you don't need all the nodes, the memory won't go to waste.

Class SevenAryNode
  Protected nodes(7) As SevenAryNode
  Public Function Node(Index As Integer) As SevenAryNode
  Public Sub Node(Index As Integer,Assigns theNode As SevenAryNode)
  ...
End Class

...
Dim myFooArray(5000) As SevenAryNode

When do you all start considering an embedded db for something like
this?  In the past I've never had more than a couple hundred items in
array's.

-Bill

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


William H Squires Jr
wsquires at satx dot rr dot com dot nospam <- remove the .nospam

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>