home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!paladin.american.edu!gatech!swrinde!zaphod.mps.ohio-state.edu!rpi!crdgw1!rdsunx.crd.ge.com!bart!volpe
- From: volpe@bart.NoSubdomain.NoDomain (Christopher R Volpe)
- Newsgroups: comp.lang.c
- Subject: Re: Question to test general C knowledge
- Message-ID: <1992Dec30.205155.19105@crd.ge.com>
- Date: 30 Dec 92 20:51:55 GMT
- References: <1992Dec28.161730.13653@mksol.dseg.ti.com> <m5TiwB1w165w@quest.UUCP>
- Sender: volpe@bart (Christopher R Volpe)
- Reply-To: volpe@ausable.crd.ge.com
- Organization: GE Corporate Research & Development
- Lines: 37
- Nntp-Posting-Host: bart.crd.ge.com
-
- In article <m5TiwB1w165w@quest.UUCP>, kdq@quest.UUCP (Kevin D. Quitt) writes:
- |> mccall@mksol.dseg.ti.com (fred j mccall 575-3539) writes:
- |> >In <wsP8VB1w165w@quest.UUCP>kdq@quest.UUCP (Kevin D. Quitt) writes:
- |> >>mouse@thunder.mcrcim.mcgill.edu (der Mouse) writes:
- |> >>>sizeof(4["this is a test"])
- |> >>>must produce 1, or your compiler's broken.
- |> >>
- |> >> Either that, or you've got 16-bit chars.
- |> >
- |> >sizeof(char) is defined to be 1, so it doesn't matter if you have
- |> >16-bit chars or not; it still better give back a 1.
- |>
- |> Interesting. The standard states (3.3.3.4) that sizeof returns the
- |> size of an object in bytes (exclusive of function and incomplete
-
- "Bytes" in this context are identical to "chars". Bytes contain an
- implementation defined number of bits according to the definition
- of terms. The standard certainly supports the 16bit character. Its "size"
- according to "sizeof", however, is still 1. Such an implementation has
- 16bit bytes.
-
- |> types), and also states that the sizeof any qualified char is 1.
- |>
- |> Apparently, while they support multi-byte characters, as strings
- |> (and provide functions for them), they don't directly support the 16bit
- |> character. Hmm...
- |>
- |>
- |>
- |> _
- |> Kevin D. Quitt 96.37% of all statistics are made up. srhqla!quest!kdq
-
- --
- ==================
- Chris Volpe
- G.E. Corporate R&D
- volpecr@crd.ge.com
-