Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!labrea!aurora!ames!sdcsvax!ucsdhub!hp-sdd!hplabs!hpcea!hpsrla!hpsrlc!darrylo From: darrylo@hpsrlc.HP.COM (Darryl Okahata) Newsgroups: comp.sys.ibm.pc Subject: Re: ** Re: MSC 4.0 Large Model ** Original Posters problem solved!!! Message-ID: <3320046@hpsrlc.HP.COM> Date: Fri, 21-Aug-87 11:24:19 EDT Article-I.D.: hpsrlc.3320046 Posted: Fri Aug 21 11:24:19 1987 Date-Received: Sun, 23-Aug-87 14:38:35 EDT References: <72@cunixc.columbia.edu> Organization: Network Measurements Div - Santa Rosa, CA Lines: 32 In comp.sys.ibm.pc, ccs016@ucdavis.UUCP (Patrick Tully) writes: > > Yes I started the whole thing :-) And I am glad to announce my code runs!!!!! > > > > > > I pulled from all the answers to my question and these were the key > > ingredients: > > > > 1) Use NULL not 0 as often as applicable. > > > > Why?? Null is defined in stdio as 0. > > Patrick Tully > pstully@ucdavis > ucdavis!deneb!ccs016 > ---------- In the large, compact (?), and huge memory models, NULL is defined as 0L, not 0. This makes a BIG difference when trying to pass a NULL pointer to a function (if you don't, your program will probably crash). You can still use 0, as long as you cast it (e.g., "(char *) 0"). Even better, always use casts with NULL (this is not necessary, although it is a good programming practice). -- Darryl Okahata {hplabs!hpcea!, hpfcla!} hpsrla!darrylo CompuServe: 75206,3074 Disclaimer: the above is the author's personal opinion and is not the opinion or policy of his employer or of the little green men that have been following him all day.