Types !?.. Confused !

Blitz3D Forums/Blitz3D Beginners Area/Types !?.. Confused !

Help !,

I've gone and got myself totally confused with TYPES.

Here's what I want to do, but in C:

struct {
float x
float y
} object[5]


I cant seem to work out the blitz code though ???
Can anyone please help out.. the 5 array types it creates must also be global.

Paul,

Check out the excellent tutorials on Blitzcoder, there is one for TYPE newbies.

It is not too difficult, but you do need to follow the process.

IPete2.

I wrote a long, descriptive tutorial about types:
CLICK HERE

Take a look here for some basic info on types:
http://home.cmit.net/rwolbeck/programmingtutorial/

Type YourParticularType
field x#
field y#
end type

dim MyArrayOfTypes.YourParticularType(5)
for i=0 to 5
MyArrayOfTypes(i)=new yourParticularType
next

and to reference them

myarrayoftypes(index)\x

Here is how I once used an array of types:
www.blitzbasic.com/Community/posts.php?topic=41076
Look down the page about 3/4 of the way for one of my posts about the Pitfall II remake I did.