[comp.lang.c] What is NULL?

MISS026%ECNCDC.BITNET@wiscvm.wisc.EDU (GREENY) (07/16/87)

considering all the discussion on what is NULL i thought a bit of humor
(however obscure) would be in order....

NULL basically equals nothing right?

And what is nothing?   ---> NOTHING!!! Therefore, NULL doesn't really
exist does it?! :-)

sorry....but I had to do this after reading my stupid philosophy book
for a test....

bye for now but not for long
Greeny

Bitnet: Miss026@ecncdc
Internet: Miss026%ecncdc.bitnet@wiscvm.wisc.edu
Disclaimer: What? Who? Me? Nope..not me..you *MUST* have the wrong guy!!

wcs@ho95e.ATT.COM (Bill.Stewart) (02/26/88)

In article <3458@killer.UUCP> richardh@killer.UUCP (Richard Hargrove) writes:
>	[ discussion by various people about NULL - the usual stuff ]
>The definition of NULL as 0L by C compilers targeted to the 80x86 is a
>kludge attempting to protect ignorant C programmers who don't cast
>NULL (which, to the compiler is indistinguishable from 0) when it
>is an actual parameter. 

On a normal machine, pointers are all the same size, or at least
pointers to type foo are always the same size.  But on an Intel
chip, pointers come in different sizes.  If you compile one
subroutine using one memory model (e.g. on Microslow C 5.0),
and another subroutine using another memory model, will they be
linked together properly (or at least refuse to link), or will
the compiler quietly link together routines with different-sized 
pointers from different memory models?

We've been burned in the past passing floats on a machine that used
IEEE-format (float and double look very different), where it didn't
coerce all floats to doubles when passing.  Will the popular PC
compilers get this one right also?
-- 
#				Thanks;
# Bill Stewart, AT&T Bell Labs 2G218, Holmdel NJ 1-201-949-0705 ihnp4!ho95c!wcs

johnson@c10sd1.StPaul.NCR.COM (Wayne D. T. Johnson) (03/05/88)

In K&R there is a sentence (sorry I left my K&R concordance as home so no
chapter and verse :-) that indicates that a 0 is a zero in any data type.

Unfortunatly, in my Lattice version of "C", the object code between
large and small memory models are quite different so that the two
models can not be linked togeather.

jay@splut.UUCP (Jay Maynard) (03/05/88)

From article <2008@ho95e.ATT.COM>, by wcs@ho95e.ATT.COM (Bill.Stewart):
> If you compile one
> subroutine using one memory model (e.g. on Microslow C 5.0),
> and another subroutine using another memory model, will they be
> linked together properly (or at least refuse to link), or will
> the compiler quietly link together routines with different-sized 
> pointers from different memory models?

Here's another one tha Microport got right in System V/AT.

If you compile modules with different memory models, and then try to link
them together, you get an error message complaining about "bad magic
number".
Yes, I know that it's cryptic, but at least it's documented (somewhere) that
this means you're trying to mix memory models.

-- 
Jay Maynard, EMT-P, K5ZC...>splut!< | GEnie: JAYMAYNARD  CI$: 71036,1603
uucp: {uunet!nuchat,academ!uhnix1,{ihnp4,bellcore,killer}!tness1}!splut!jay
Never ascribe to malice that which can adequately be explained by stupidity.
The opinions herein are shared by none of my cats, much less anyone else.