Article View: comp.os.ms-windows.programmer.misc
Article #2235Style wars with NULL (was Re: How to remove kbd message from system queue?)
From: Tom W. Brown
Date: Thu, 21 Jan 1993 18:37
Date: Thu, 21 Jan 1993 18:37
21 lines
1551 bytes
1551 bytes
In article <1993Jan20.211104.8721@emr1.emr.ca>, jagrant@emr1.emr.ca (John Grant) writes: |> Technically speaking, NULL is used for a pointer, whereas |> 0 or 0L are int values. The CALLBACK function requires an |> LRESULT (long int), which is a 0 or 0L, but not a NULL. Well, technically speaking NULL is defined as 0 (or should be) so there is nothing wrong with using it (no matter whether the function returns an int, a long, or a pointer). However stylistically I agree with John. I use NULL for pointers and handles and an explicit zero for explicit numeric types. Likewise I try to use TRUE and FALSE only for BOOL return types. Let the style war begin! :-0 ---------------------------------------------------------------------------- Tom Brown | "She turned me into a newt... PE Nelson Systems | ... I got better" twbrown@pe-nelson.com | Monty Python and the Holy Grail ----------------------------------------------------------------------------
Technical Details
Message-ID:
<752@lax.lax.pe-nelson.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!lax.pe-nelson.com!lax!twbrownReferences:
<1ja2l6INNla3@msuinfo.cl.msu.edu> <1993Jan19.135956.22950@ugle.unit.no> <1993Jan20.211104.8721@emr1.emr.ca>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!lax.pe-nelson.com!lax!twbrown From: twbrown@PE-Nelson.COM (Tom W. Brown) Newsgroups: comp.os.ms-windows.programmer.misc Subject: Style wars with NULL (was Re: How to remove kbd message from system queue?) Message-ID: <752@lax.lax.pe-nelson.com> Date: 21 Jan 93 18:37:34 GMT References: <1ja2l6INNla3@msuinfo.cl.msu.edu> <1993Jan19.135956.22950@ugle.unit.no> <1993Jan20.211104.8721@emr1.emr.ca> Sender: news@lax.pe-nelson.com Organization: PE-Nelson Lines: 22