PDA

View Full Version : null as a parameter


Donone
11-24-2007, 05:09 PM
I am having difficulty with achieving the equivalent of the following dual purpose func, which does not work due to null and false being the same.

public func visible(value$)
if(value$<>null)
if(value$ or value$==False)
visible$=value$;
ShowSprite(Sp$,visible$);
end;
end;
return(visible$);
end;


I want to either change the value or return the current without changing it. I thought null input would have solved it but it only works with non-boolean functions.
Any ideas please.

kornalius
11-25-2007, 03:24 PM
NULL and FALSE are both equal to 0.

What will value$ contain? An handle? A string?

In PPL it's either a double valus or a string, if it contains no string, it's 0.