Article View: comp.std.c
Article #3991Re: Bytes & Chars
From: Thad Smith
Date: Thu, 14 Sep 1995 06:21
Date: Thu, 14 Sep 1995 06:21
27 lines
1733 bytes
1733 bytes
In article <1995Sep13.212437.6823@sq.com>, msb@sq.com (Mark Brader) wrote: >> ... memcpy() can work on partial objects or multiple objects as well >> as a single object. > >There is no such thing as a partial object in C. I don't see the importance of this distinction. If I copy the first sizeof(double)/2 bytes of a double (assume sizeof(double) > 1), I would call this part of an object which has type double, or a partial object for short. This can be combined with the remaining bytes to completely copy an object of type double. >To paraphrase Isaac >Asimov said, if you break a piece of chalk in half, you don't get two >partial piece of chalk; you get two pieces. An object is a region of >storage, so it works the same way. Chalk is uniform, so each piece serve the purpose of the whole. This isn't true of half a double. Every occurrance of "object" that I have seen in the standard refers to an object with some corresponding type. This doesn't fit with the half double, unless you want to say that the object is an array of a char type. While we can call the copied portion an object which is an array of chars, it makes more sense to me when copying part of a double to say that a partial object was copied. Thad
Technical Details
Message-ID:
<qb6VwQ9ythmT084yn@csn.net>Path:
arc1-ca.pugleaf.net!teal.csn.net!not-for-mailReferences:
<DDvt89.Jx5@sco.COM> <DEs7JA.892@ukpsshp1.serigate.philips.nl> <DEu4Ep.76H@ukpsshp1.serigate.philips.nl> <+axVwQ9ytR3d084yn@csn.net> <1995Sep13.212437.6823@sq.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!teal.csn.net!not-for-mail From: thads@csn.net (Thad Smith) Newsgroups: comp.std.c Subject: Re: Bytes & Chars Date: 14 Sep 1995 00:21:16 -0600 Organization: T3 Systems Message-ID: <qb6VwQ9ythmT084yn@csn.net> References: <DDvt89.Jx5@sco.COM> <DEs7JA.892@ukpsshp1.serigate.philips.nl> <DEu4Ep.76H@ukpsshp1.serigate.philips.nl> <+axVwQ9ytR3d084yn@csn.net> <1995Sep13.212437.6823@sq.com> Reply-To: ThadSmith@acm.org NNTP-Posting-Host: 199.117.27.22