Block Initialization
Chris Torek
chris at umcp-cs.UUCP
Wed Oct 22 13:58:15 AEST 1986
>>The chore is to initialize the entire structure to zero. How do I do it?
In article <4510 at brl-smoke.ARPA> gwyn at brl.arpa (Doug Gwyn
(VLD/VMB) <gwyn>) writes:
>The wrong way is to use bzero(), which fills a region with 0 bytes
>....
Structure assignment is fine in most cases, but suppose instead that
some hapless programmer is supposed to initialise a 40K-byte structure
using a small model compiler on an IBM PC? There is no space for a
second copy of the structure. Using bzero() here (assuming it exists,
or after writing it) is reasonable, given the compiler limitations.
--
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690)
UUCP: seismo!umcp-cs!chris
CSNet: chris at umcp-cs ARPA: chris at mimsy.umd.edu
More information about the Comp.lang.c
mailing list