Code: Select all
Type SubType1
As Single X
Declare Sub PrintXfromSub2()
End Type
Type SubType2
As Single X
End Type
Type MainType
As SubType1 Sub1
As SubType2 Sub2
End Type
Dim As MainType Main
Main.Sub2.X = 4
Main.Sub1.PrintXfromSub2()
Sleep
End
Sub SubType1.PrintXfromSub2()
'' how the heck do I get X from subtype2 ???
'' (below line doesn't work)
Print Main.Sub2.X
End Sub
The trouble is I can't seem to adress data in one nested subtype with a sub in another one. What's the right syntax?
And another thing... If I try to define a type like this:
Code: Select all
Type SomeType
Declare Sub SomeSub()
End Type
I get this error:
error 208: An ENUM, TYPE or UNION cannot be empty, found 'End' in 'End Type'
Isn't that a FB bug, since obviously the type is not empty?
cheers, h4tt3n