Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!mailrus!uflorida!novavax!twwells!bill From: bill@twwells.uucp (T. William Wells) Newsgroups: comp.lang.c Subject: Re: hardcoded constants Message-ID: <267@twwells.uucp> Date: 22 Dec 88 02:18:48 GMT References: <2636@m2-net.UUCP> <1104@goofy.megatest.UUCP> Reply-To: bill@twwells.UUCP (T. William Wells) Organization: None, Ft. Lauderdale Lines: 15 Summary: Expires: Sender: Followup-To: Distribution: Keywords: In article <1104@goofy.megatest.UUCP> djones@megatest.UUCP (Dave Jones) writes: : But if you don't like the naked "1", how about this? : : foo = malloc( strlen(s) + strlen(t) + sizeof('\0')); : : Tells it all. And keeps the reader on track, not grepping around : for macros. How about sizeof('\0') is equal to the size of an integer, which is unlikely to be 1? Remember, in C, character constants are integer constants. --- Bill {uunet|novavax}!proxftl!twwells!bill