using NULL with types

BlitzPlus Forums/BlitzPlus Beginners Area/using NULL with types

mudcat(Posted 2005) [#1]
What is the best way to find out if the TYPE LIST is empty?
The example in the manual uses this

; Null example

Type Alien
Field x,y
End Type

a.Alien = New Alien
If a <> Null Then Print "Alien exists!"
Delete a
if a = Null Then Print "Alien gone!" 


Do I have to use the NEW command to see if the LIST is empty?Then Delete?

What I want to do is find out if all my objects are destroyed.I was going to make a global variable "shipcount" to keep track but the NULL command sounds much cleaner and easier to keep track of.
Hope my questions are clear.
Thanks,
mudcat


WolRon(Posted 2005) [#2]
empty = True
For a.alien = Each Alien
  If a <> NULL Then empty = False
Next



Floyd(Posted 2005) [#3]
If First Alien = Null Then Print "No aliens here."



mudcat(Posted 2005) [#4]
Thanks all,
mudcat