Folks,
More and more nonsense are coming in and I find it really difficult to follow
any new post that may come and I have to either search for specific content or
scroll down until I hit it by accident.
Can we do something about it?
It's getting really frustrating :/
Cheers.
--
On Monday, October 30, 2017 at 2:35:13 AM UTC+2, ROGER GRAYDON CHRISTMAN wrote:
> NOTE: The case in question was never comparing to True; it was comparing to
> NULL.
>
> There is no "No: if x == None" below, because None is not Boolean.
> Similarly comparing a pointer to NULL is not the same
On Sunday, October 29, 2017 at 4:18:38 AM UTC+2, Dan Sommers wrote:
> On Sat, 28 Oct 2017 16:20:54 -0700, Στέφανος Σωφρονίου wrote:
>
> > I do believe though that if (!d) is a lot clearer than if (d == NULL)
> > as it is safer than falsely assigning NULL in d, by pure mistake.
&
On Saturday, October 28, 2017 at 9:54:30 PM UTC+3, bartc wrote:
> On 28/10/2017 19:42, Στέφανος Σωφρονίου wrote:
> > Greetings everyone.
> >
> > I have noticed that in many if conditions the following syntax is used:
> >
> > a) if (variable == NULL)
Greetings everyone.
I have noticed that in many if conditions the following syntax is used:
a) if (variable == NULL) { ... }
b) if (variable == -1) { ... }
c) if (variable != NULL) { ... }
What I wanted to ask is, is there a particular reason for not choosing
a) if (!variable) { ... } in place