User defined type within type

Blitz3D Forums/Blitz3D Programming/User defined type within type

Cousin Gilgamesh(Posted 2006) [#1]
is there any way to have a user defined type inside another user defined type? Say you wanted a random number of schools of fish and each school has 3 fish in it, which are userdefined types. is there a way to make a school type that contains fish types in it?


big10p(Posted 2006) [#2]
Const NUM_SCHOOL_FISHES = 3

Type fishT
  Field a,b,c
End type

Type schoolT
  Field fish.fishT[NUM_SCHOOL_FISHES-1]
End Type



Jams(Posted 2006) [#3]
[EDIT] Big beat me to it


Cousin Gilgamesh(Posted 2006) [#4]
hey thanks


octothorpe(Posted 2006) [#5]
More fun is when you want an arbitrary number of fish in each school.