Another Type Question

Blitz3D Forums/Blitz3D Beginners Area/Another Type Question

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

The first part of your type point can be anything u want. BUT the part after the dot, must be the actual type name.

[CODE]
Type thingA
field x,y
End Type
Type thingB
field x,y
End Type

TA.thingA = new thingA
TB.thingA = new thingA
[/code]

But, why have two type collections, which contain the same data? why not do...

[CODE]
Type thingA
field x,y
End Type


TA.thingA = new thingA
TB.thingA = new thingA
[/code]

then

If This=True 
do_stuff(TA.thingA) 
Else 
do_stuff(TB.thingA) 
End if 


function do_stuff(t.thingA) 
t\x = t\x +1 
end function


TB.thingA and TA.thingA are different type objects, using the type collection "thingA"