last type

Blitz3D Forums/Blitz3D Beginners Area/last type

ryan scott(Posted 2004) [#1]
how can i determine if i've hit the last type?

if i am iterating over them as such:

f = After f

it'll run itself right off the end of the list.

is there some way to do something like

if exists(f)

or

if not last f

?

i don't see anything for this.


koekjesbaby(Posted 2004) [#2]
if f = null; you went past the last type
;or
if f <> null; the object exists



Beaker(Posted 2004) [#3]
Type alien
Field x,y
End Type

For f= 0 To 10
a.alien = New alien
If f = 10 a\x = 20
Next

a = Last alien
Print a\x
Stop
End
OR
Type alien
Field x,y
End Type

For f= 0 To 10
a.alien = New alien
If f = 10 a\x = 20
Next

a = First alien
While a <> Last alien
a = After a
Wend

Print a\x
Stop
End



ryan scott(Posted 2004) [#4]
very nice!

thanks a lot