Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!yahoo From: yahoo@unix.cis.pitt.edu (Kenneth L Moore) Newsgroups: comp.lang.c Subject: Re: FREE Message-ID: <22657@unix.cis.pitt.edu> Date: 2 Mar 90 01:55:49 GMT References: <2714@stl.stc.co.uk> <1990Feb27.155133.20341@druid.uucp> <16055@haddock.ima.isc.com> <1990Mar1.140829.17199@druid.uucp> Reply-To: yahoo@unix.cis.pitt.edu (Kenneth L Moore) Organization: Univ. of Pittsburgh, Comp & Info Services Lines: 21 In article meissner@osf.org (Michael Meissner) writes: >In article <1990Mar1.140829.17199@druid.uucp> darcy@druid.uucp (D'Arcy >J.M. Cain) writes: > >| In article <16055@haddock.ima.isc.com> karl@haddock.ima.isc.com (Karl Heuer) writes: >>calloc does what you want and even initialize the space to zeroes for you. > >The calloc() function is disrecommended. Generally speaking, you should use >malloc() and initialize the contents yourself. There are instances where you want an uninitialized variable to be (nil) and not zero as a flag. This way you know you have a coding problem and can correct it. Otherwise, you may start computing with an incorrect zero resulting in an erroneous answer that might look reasonable. -- I don't yell and I don't tell and I'm grateful as hell: Benny Hill