how to declare recursive type in VB? 
Author Message
 how to declare recursive type in VB?

for example

Type myType
        strFirst As String
        nID As Long
        mtNext As myType
End Type

this declaration doesn't work. is there any way to declare recursive
type at all?



Mon, 15 Jan 2001 03:00:00 GMT  
 how to declare recursive type in VB?
Try creating a class instead of a type. Like

Public strFirst As String
Public nID As Long
Public clsChild as MyClass

Put this into a class called MyClass.

--
Arthur McAlister

Quote:

>for example

>Type myType
> strFirst As String
> nID As Long
> mtNext As myType
>End Type

>this declaration doesn't work. is there any way to declare recursive
>type at all?



Mon, 15 Jan 2001 03:00:00 GMT  
 how to declare recursive type in VB?
Yes, by using classes you can create a link list.

Class:Class1
Public Next as Class1 'or alternatively use property procedures

Remember though that you can simply use the collection object...

Cheers
Cliff Saunders



Quote:
> for example

> Type myType
>    strFirst As String
>    nID As Long
>    mtNext As myType
> End Type

> this declaration doesn't work. is there any way to declare recursive
> type at all?



Mon, 15 Jan 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Cannot assign a variable declared as a string to a variable declared as data type

2. Recursive data types in VB?

3. How do I declare enumerated types in VB?

4. Help on How to declare Constant User-Define-Type array in VB

5. AVICAP32 API Declares and types for VB !!!

6. Recursive data types.

7. Recursive Types

8. Dynamic recursive type arrays

9. Recursive Types

10. Type and Pointers for recursive programs

11. Converting C Declares Into VB Declares

12. recursive structures NOT recursive

 

 
Powered by phpBB® Forum Software