07 April 1998
Suppose you wish to test that a pointer is not null before passing it to an external routine. On some Eiffel compilers, the following code will compile and run, but it won't work as expected. What's wrong?
p: POINTER
...
if p = void then
print("Nil pointer.%N")
else
some_external_routine(p)
end
Eiffel and NICE are registered trademarks of the Nonprofit International Consortium for Eiffel.