Max line length (was Re: programming challenge ...)

Blair P. Houghton bph at buengc.BU.EDU
Fri Mar 17 07:47:24 AEST 1989


In article <3072 at nunki.usc.edu> jeenglis at nunki.usc.edu (Joe English) writes:
>guy at auspex.UUCP (Guy Harris) writes:
>>
>>December 7, 1988 draft, says:
>>	2.2.4.1 Translation limits
>>
>>	   The implementation shall be able to translate and execute
>>	at least one program that contains at least one instance of
>       ^^ ^^^^^ ^^^ ^^^^^^^
>>	every one of the following limits:
>
>Shouldn't it say instead:
>
>  If (for all programs P such that 
>            (there exists an L in {following limits} such that P contains L)
>      the implementation can handle P
>     )
>  then the implementation is in compliance with section 2.2.4.1?
>
>(Obviously the answer is "no," and I've misinterpreted the
>excerpt.  Can someone explain the language here?)

I did the same double-take at that semantic curveball, but then I looked
askance and it seemed to be sensible.

For instance, your version says that the compiler should compile EVERY
program that contains those limits, but, your program may be broken in
many other ways, and your version of this rule would STILL require the
compiler to compile it, which is patently impossible.

The rule as it is written allows for the rejection of a program if it
breaks other rules, but if it does not, then that program has got to be
compiled, provided it is within these limits, even if the program
stretches to use all of these limits.

The program implied by "at least one program" would therefore be the
program with all of its syntax perfectly C, and using _all_ of the
limits given.

Does anyone have any intention of writing such a program?  Is anyone going
to write the ANSI-C "exerciser" program?  Sounds like fun.

				--Blair
				  "510 or fight!"



More information about the Comp.lang.c mailing list