Have a look at the top of the "robots" module. You will see a whole bunch of variables, constants and types defined.
The primary one is the "robot" type
Later, rob() is defined as robot.
here is an example.
Private type test
subtest1 as integer
subtest2 as string
subtest3 as long
end type
public newtest(1000) as test
Using this we define "test" as a type, then we add subtest1, 2 and 3 as members.
We can't actually use "test" in the main program as it is "type" rather than a variable, so we have to make a variable that mirrors the "type"
"public newtest(1000) as test" defines a new user type, "newtest" as the same format as the original "test" type.
In addition we now have it as an array with 1000 elements.
In the main loop we can now address things like....
newtest(389).subtest2
as a variable because subtest2 is a "member" of the "type"
In addition we can write stuff like
with newtest
for t = 1 to 1000
.subtest1 = t
next t
end with
Does that make a little sense now?