Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!aplcen!uunet!taumet!steve From: steve@taumet.com (Stephen Clamage) Newsgroups: comp.lang.c Subject: Re: Turbo C large character array Keywords: TC, char, array, large, huge Message-ID: <371@taumet.com> Date: 2 Aug 90 15:03:44 GMT References: <1990Jul27.193520.4689@ux1.cso.uiuc.edu> <6819@ozdaltx.UUCP> <1627@excelan.COM> Distribution: comp Organization: Taumetric Corporation, San Diego Lines: 21 donp@na.excelan.com (don provan) writes: >In general, i avoid sizeof(type), since >there's almost always a specific example of type at hand, and normally >it is in fact that specific example i want to know the size of, not >the generic type. In general, I agree, but there is one pitfall with this: typedef int datatype[20]; int foo(datatype d) { ... sizeof(d) ... } The type of d is silently coerced to int*, and sizeof(d) becomes sizeof(int*), which is not what you want. -- Steve Clamage, TauMetric Corp, steve@taumet.com