:: Re: [DNG] Dng Digest, Vol 13, Issue…
Inizio della pagina
Delete this message
Reply to this message
Autore: Jonathan Wilkes
Data:  
To: Hendrik Boom, dng@lists.dyne.org
Oggetto: Re: [DNG] Dng Digest, Vol 13, Issue 53
Yes it will, in doing so implicitly casting the int to a pointer.
If on the other hand, if this was split into two statements the flow of the 
code would be crystal clear.  Even people who don't understand C's 
precedence would be able to understand the code.
-Jonathan
     On Monday, October 19, 2015 6:18 PM, Hendrik Boom <hendrik@???> wrote:



On Mon, Oct 19, 2015 at 09:09:03PM +0200, aitor_czr wrote:
> I use the '==' operator. For example, in the case of a file:
>
> FILE *fp;
>
> if ( fp = fopen ( "file_name", "w") == NULL) { ... error message,
> and exit... }


Won't that assign the result of the equality test to fp instead of the FILE *?

-- hendrik
_______________________________________________
Dng mailing list
Dng@???
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng