Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Types

Status
Not open for further replies.

guber

Programmer
Jan 4, 2002
27
US
I have the Type:

Type Estrutura
b As String * 2
c As String * 5
End Type

I declare a as Estrutura then

a.b = "AB"
a.c = "ABDCE"

ok ??

Now, I need other type (or anything like this to refer this type) like this:

Type EstruturaB
d1 As String * 1
d2 As String * 1
d3 As String * 5
End Type


But now is the point:
I need that:

d1 value will be "A" (the first a.b characther...)
d2 value will be "B" (the second a.b characther...)
d3 value will be "ABDCE" (the a.c value)


Is there any way to link this 2 types or any way to do this ???

Thanks any help !!!

In Cobol I can do this , but in Vb I don't know.
 
no way to link the types. But you could declare d as exturab and then:

d.d1 = mid(a.b, 1, 1)
d.d2 = mid(a.b, 2, 1)
d.d3 = a.c Craig, mailto:sander@cogeco.ca

Si hoc legere scis, nimis eruditionis habes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top