Types !?.. Confused !

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

PaulJG(Posted 2005) [#1]
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.


IPete2(Posted 2005) [#2]
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.


wizzlefish(Posted 2005) [#3]
I wrote a long, descriptive tutorial about types:
CLICK HERE


WolRon(Posted 2005) [#4]
Take a look here for some basic info on types:
http://home.cmit.net/rwolbeck/programmingtutorial/


Matty(Posted 2005) [#5]
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


WolRon(Posted 2005) [#6]
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.