That certainly lets you use an integer variable a% to store a reference to a type object.
You could even use a$, a string variable.
But what sense does any of this make? We have a new data type called player.
The natural way to refer to this is with a.player, a variable of this new type.
Here is an example.
You could even use a$, a string variable.
But what sense does any of this make? We have a new data type called player.
The natural way to refer to this is with a.player, a variable of this new type.
Here is an example.
Type player Field n Field a.player End Type For k = 1 To 4 t.player = New player t\n = k Next t = First player t\a = Last player Print t\a\n ; t is the first player, t\a points to the last player ; and t\a\n is the n value of t\a, which is 4. WaitKey : End