TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: andrew clarke
from: Paul Edwards
date: 1996-04-28 09:05:52
subject: Function args

> I thought NULL was guaranteed to be a valid pointer, no need for
> the (void *) typecast?  It's only 0 that needs a typecast.

ac> #ifndef NULL
ac>  #if defined(__SMALL__) || defined(__MEDIUM__) || defined(__386__)
ac>   #define NULL   0
ac>  #else
ac>   #define NULL   0L
ac>  #endif
ac> #endif

ac> Hmmm.

ac> Regards
ac> Andrew (confused)

In this case, a typecast would force 0 to become 0L when using
the large memory model.  This is required when doing something
like a printf("%p %d\n", 0, 5555);

BFN.  Paul.
@EOT:

---
* Origin: X (3:711/934.9)

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.