Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!pprg.unm.edu!hc!lll-winken!uunet!sdrc!scjones From: scjones@sdrc.UUCP (Larry Jones) Newsgroups: comp.std.c Subject: Re: How limited is a strictly conforming program? Summary: There goes my entry in the PSRCCC Message-ID: <684@sdrc.UUCP> Date: 30 Mar 89 22:37:50 GMT References: <12208@haddock.ima.isc.com> Organization: Structural Dynamics Research Corp., Cincinnati Lines: 27 In article <12208@haddock.ima.isc.com>, karl@haddock.ima.isc.com (Karl Heuer) writes: > S1.7 of the pANS says "A strictly conforming program ... shall not exceed any > minimum implementation limit". Does this include the limits in S2.2.4.1? I > would think so, but the text refers only to the minimum quality of the > implementation. Is a program still strictly conforming if it has more than > 509 characters in a string literal? (And does that figure include the > trailing null character, or not?) > > Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint Yes, that does include the limits in S2.2.4.1 so a program with more that 509 characters in a string literal is not strictly conforming (and that blows away my entry in the Portable Self Replicating C Code Contest - I forgot about that limit). As to whether to count the null or not, it isn't clear, but I don't think so. In S3.1.4 it says that "In translation phase 7, a byte or code of value zero is appended to each multibyte character sequence that results from a string literal or literals." which implies that it is no longer a string literal by the time the null is added. ---- Larry Jones UUCP: uunet!sdrc!scjones SDRC scjones@sdrc.UU.NET 2000 Eastman Dr. BIX: ltl Milford, OH 45150 AT&T: (513) 576-2070 "When all else fails, read the directions."