Mailinglist Archive: opensuse-programming (61 mails)

< Previous Next >
Re: [suse-programming-e] system-dependent behaviour
  • From: Anders Johansson <andjoh@xxxxxxxxxx>
  • Date: Sat, 17 Sep 2005 14:55:41 +0200
  • Message-id: <200509171455.41351.andjoh@xxxxxxxxxx>
On Saturday 17 September 2005 14:48, Jerry Feldman wrote:
> On Fri, 16 Sep 2005 20:04:29 +0200
>
> Anders Johansson <andjoh@xxxxxxxxxx> wrote:
> > But I wouldn't include x++ in that definition
>
> The pre-increment/post-increment (and decrement) operators are not
> fancy code in C, they are an integral part of the language, but they
> are often misused.
>
> I also do not consider this fancy code:
> int c;
> while( (c = getchar()) != EOF) {

I agree, that's standard practice

> ...
> }
>
> Note that I generally try to compare vs. NULL or 0, for example:
> 'if (p == NULL)'

So you're not one of those who put potential lvalues to the right of the
equality test, to make sure that a missed = makes it a syntax error rather
than an unwanted assignment?


< Previous Next >