Special Data Structure 
Author Message
 Special Data Structure

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  
 Special Data Structure

Quote:

> 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?

You can't actually use C type pointers, but this can work if e.g. you want
to construct a binary tree:

Type node
  value as string  ' Insert your own type here as needed
  left as integer
  right as integer
End Type

Dim tree() as node  ' Define tree as a dynamic array of nodes

Your left and right fields are then used to store the subscripts of the
"linked" items.

Check out "Dynamic Arrays" in the Programmers Guide (page 173 for VB3.0).

Cheers,

Warren Hill                            
                                      | "Spock, what's this thing called
Northern Territory University         |  Windows?"
( http://www.ntu.edu.au/ )            |                  
Darwin    Australia                   | "It's DOS Jim, but not as we know



Fri, 22 May 1998 03:00:00 GMT  
 Special Data Structure

Quote:

>...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?

Hi Dave!
Do you mean visually? I use an outline control. Programmatically? I use a
linked list. I am doing a project now in which I use an Access table to
store a double linked list. If this is what you have in mind, perhaps I
can help you. I imagine it's the the same stuff regardless of programming
language used. Later... - dmc


Sun, 24 May 1998 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Updating Data in a Self Joined Many-to-Many Data Structure (Previous Post Omitted Text)

2. Copy Data Structures no data DB to DB

3. copy data structure and data

4. Special Characters in User Data

5. reading the data from special forms in VBA

6. Data Date special field

7. parse data into flat file structure

8. Updating Values in a Self-Joined Many-to-Many Data Structure

9. Help with Structure Data Item Scope

10. Reading binary data into a structure?

11. Passing large data structures in recursive functions

12. Create and manage data structures with this ActiveX component

 

 
Powered by phpBB® Forum Software