Paul Gilmartin dixit:

> If it's a string or notionally logical, I'm quite comfortable
> with "if ( ! ct ) ..." (or "if ( ! *ct ) ...", depending).

Yes, but some people prefer the == form, and then it's NULL not 0.

> If it's notionally numeric, I'm more comfortable with "if (ct == 0) ..."

Indeed, although I admit I often write if (!number) too. Maybe
this should be added to the style(9) manpage¹ ;)

bye,
//mirabilos

¹) https://www.mirbsd.org/man9/style
-- 
Sometimes they [people] care too much: pretty printers [and syntax highligh-
ting, d.A.] mechanically produce pretty output that accentuates irrelevant
detail in the program, which is as sensible as putting all the prepositions
in English text in bold font.   -- Rob Pike in "Notes on Programming in C"


_______________________________________________
Lynx-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lynx-dev

Reply via email to