Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!think!masscomp!quasar!ftw From: ftw@quasar..westford.ccur.com (Farrell Woods) Newsgroups: comp.lang.c Subject: Re: C strongly typed? Message-ID: <26644@masscomp.ccur.com> Date: 10 Mar 90 00:41:15 GMT References: <259@eiffel.UUCP> <1990Mar1.172526.28683@utzoo.uucp> <849@enea.se> <1990Mar7.182230.5517@utzoo.uucp> <25F5AA40.27091@paris.ics.uci.edu> <25695@masscomp.ccur.com> <25F6E8B7.16437@paris.ics.uci.edu> Sender: news@masscomp.ccur.com Reply-To: ftw@quasar.westford.ccur.com (Farrell Woods) Organization: Concurrent Computer Corp. Westford MA. Lines: 29 In article <25F6E8B7.16437@paris.ics.uci.edu> bvickers@ics.uci.edu (Brett J. Vickers) writes: >ftw@quasar.westford.ccur.com, I write: >>...The point is that `char' and `int' (and, `short' and `long') >>all describe *integer* quantities.... >If C were as strongly typed a language as Ada (or Pascal) is, it >would not allow integers to be accessed and stored as char types. You're missing the point: C doesn't have a `char' type in the same sense as Pascal, et. al. It has integers that can hold greater or lesser ranges of values, depending on your needs (you describe your need by declaring an appropriately sized variable). For instance: 'c' has type `int'. Really. Try this: main() { printf("%d\n", sizeof ('c')); } and tell us what your compiler says. It *should* give an answer that is the same as sizeof (int). -- Farrell Woods -- Farrell T. Woods Voice: (508) 392-2471 Concurrent Computer Corporation Domain: ftw@westford.ccur.com 1 Technology Way uucp: {backbones}!masscomp!ftw Westford, MA 01886 "I can't drive...fifty-five!"