Ignore my last posting. I see the light now. For Each calls on its own method and recurses.
Thanks. --Kirt 2006/10/24, Kirt Cathey <[EMAIL PROTECTED]>:
Joe and Robert, Both offerings helped. Thank you. Make a method to deal with the current company, make a method to deal with its subcompanies - this is definitely in the right direction. Then how does one go the third (Xth) level down? Thanks again. --Kirt 2006/10/24, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > On Oct 23, 2006, at 03:44 UTC, Kirt Cathey wrote: > > > In the company object, there is an array of companies. > > > > I need to be able to recurse through the Company objects Companies > array and > > downstream. > > The answer is probalby in recursion, but still have not successfully > coded a > > recursion loop in RB that can read this kind of data, or similar data > (such > > as a TreeView). > > Recursion isn't hard in RB (or any other modern language) but does take > a little getting used to. It's also not always the best solution to > the problem. But anyway, the recursive solution would look something > like: > > Sub ProcessCompany( c as Company ) > DoSomethingWith c > for each subcompany As Company in c.subcompanies > ProcessCompany subcompany > next > End Sub > > Here of course I'm imagining that your array of companies within a > company is called "subcompanies." > > HTH, > - Joe > > > -- > Joe Strout -- [EMAIL PROTECTED] > Verified Express, LLC "Making the Internet a Better Place" > http://www.verex.com/ > > _______________________________________________ > 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> > -- Kirt Cathey WorkPapers Development
-- Kirt Cathey WorkPapers Development _______________________________________________ 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>