Thats possible without problems.
You just have to make Shark, Whale etc all seperate types.
The other possibility is to implement your own linked list.
A linked list is a quite easy structure:
it contains out of containers that point to the next container and to the value they hold.
For creature this would be like:
Type TList
field next.TList
field creature.TCreature
end Type
And now you add a field of type TList to your structure.
Whenever a creature of a given type is added you look for this creature type, go manually through the whole list and add the new instance at the end of the list.
I think there is a codearchiv entry on that. If not, there are several tousand sites on the net that explain it even with nice Java animations, so you can easily understand how it works if my short description wasn't enough :)
You just have to make Shark, Whale etc all seperate types.
The other possibility is to implement your own linked list.
A linked list is a quite easy structure:
it contains out of containers that point to the next container and to the value they hold.
For creature this would be like:
Type TList
field next.TList
field creature.TCreature
end Type
And now you add a field of type TList to your structure.
Whenever a creature of a given type is added you look for this creature type, go manually through the whole list and add the new instance at the end of the list.
I think there is a codearchiv entry on that. If not, there are several tousand sites on the net that explain it even with nice Java animations, so you can easily understand how it works if my short description wasn't enough :)