Somebody Please HELP!! 
Author Message
 Somebody Please HELP!!

Can anybody help me here? This may be a stupid question, but does
anyone know how to represent data in VB as links and nodes?  Having a
node represent any piece of information and having a link that points
to another node.  I know this is simple C stuff, but what about in VB?
Any ideas?

Thanks in advance.

Dave



Wed, 20 May 1998 03:00:00 GMT  
 Somebody Please HELP!!
On Dec 02, 1995 19:50:59 in article <Somebody Please HELP!!>,

Quote:

>Can anybody help me here? This may be a stupid question, but does
>anyone know how to represent data in VB as links and nodes?  Having a
>node represent any piece of information and having a link that points
>to another node.  I know this is simple C stuff, but what about in VB?  
>Any ideas?

>Thanks in advance.

>Dave

Try this:

Public Type NodeElement
    Info As String (or other info type)
    Link As Integer
End Type

Dim BunchOfNodes[A Big Number] as NodeElement

When you create a new node, stuff the info into the next available slot in
BunchOfNodes. When you need to set a link, set the .link component of the
node to the index of the node you need to point to...

Unfortunately, it's a little hard to "forget" that the elements are all in
an array, and there's no dynamic re-allocation. (Actually, you can fake
dynamic re-allocation with 2 arrays and the redim statement, but unless
it's absolutely necessary, it's more trouble than it's worth.)

You _can_ make it work this way... I did a project like this a while ago (a
long while - it was on a Commodore 128!), and it did work!

good luck,
gordo



Thu, 21 May 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Could somebody please help a newbie?

2. URGENT - can somebody please help?

3. Could somebody please help a newbie?

4. Somebody, please, HELP!

5. Can somebody please help me

6. URGENT - can somebody please help?

7. SOMEBODY PLEASE HELP ME .......

8. Somebody please help me!

9. Somebody please help me to create an Excel Workbook w/sheets from VB4.0

10. Somebody please help me.

11. Somebody please help......

12. Somebody...PLEASE HELP ME!!!!

 

 
Powered by phpBB® Forum Software