Types and DIM

Blitz3D Forums/Blitz3D Beginners Area/Types and DIM

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Type fred
  Field ears
End Type

Dim bloke.fred(9)

For n=0 to 9
  bloke(n) = new fred
  bloke(n)\ears = Rand(4)
Next

show_fred()

Waitkey()

end


Function show_fred(); Arrays are global
  for n=0 to 9
    print "Fred now has " + bloke(n)\ears + " ears!"
  Next
End Function

YAN