Why isn't Null a constant in Blitz?

Blitz3D Forums/Blitz3D Programming/Why isn't Null a constant in Blitz?


Well, you can always have a Global instance to compare with.

example:

type mytype
...
end type

global nullmytype.mytype

function dostuff(param1.mytype, param2.mytype = nullmytype)
if param2 = nullmytype then
... you have it when its null
end function



Remedied with Handle()...
type mytype
  ...
end type

global nullmytype.mytype

function dostuff(param1.mytype, param2.mytype = nullmytype)
   if Handle(param2) = Handle(nullmytype) then
       ... you have it when its null
end function


It should work.