Re: 3 Questions

From: Daniel A. Koepke (
Date: 01/31/01

On Tue, 30 Jan 2001, Peter Ajamian wrote:

> When 0 is casted as a pointer it must be converted to NULL

No.  He meant NULL *is* 0.  Conversion from 0 to NULL is meaningless.
NULL *is* 0.

> [...]

You're confusing NULL and null.  NULL is defined by the C standard.  Null
is a platform-dependent concept.

> Now if you're quite sure that the program your working on will never
> be compiled on a platform that uses a value other than all-bits-zero
> [...]

And you can be quite sure of that.  Because it's true in 99% of the cases
and the 1% probably aren't supported, anyway.

> That will work on most platforms but it does not follow the ANSI
> standard.

And using EXIT_FAILURE gains us nothing but the ability to claim
conformance to that provision or, maybe, readability (if you like that
sort of thing).  Unless you can provide proof of some platform that will
be broken completely by returning 1 instead of EXIT_FAILURE that CircleMUD
otherwise supports, the issue seems moot.


   | FAQ: |
   | Archives: |

This archive was generated by hypermail 2b30 : 12/03/01 PST