We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › if ( value == null )
Page Index Toggle Pages: 1
if ( value == null ) (Read 618 times)
if ( value == null )
Dec 2nd, 2009, 11:52am
 
When I try to use...

Code:
if ( value == null ) 



...because processing won't allow me to set default argument variables for a function, I get this error:

Code:
[color=#ff0000]The operator != is undefined for the argument type(s) float, null[/color] 



I don't get it. 'value' is defined, and the whole idea of null is that it isn't defined either.

Can anyone help?
Re: if ( value == null )
Reply #1 - Dec 2nd, 2009, 11:53am
 
I got an error, so I guess it sent it twice.
Re: if ( value == null )
Reply #2 - Dec 2nd, 2009, 2:34pm
 
Jon Cousins wrote on Dec 2nd, 2009, 11:53am:
I got an error, so I guess it sent it twice.

Yes, common error, you can delete your messages yourself.
Page Index Toggle Pages: 1