Max line length (was Re: programming challenge ...)
Doug Gwyn
gwyn at smoke.BRL.MIL
Mon Mar 13 14:35:20 AEST 1989
In article <9777 at bloom-beacon.MIT.EDU> jfc at athena.mit.edu (John F Carr) writes:
>What is the longest line allowed in a C program?
It depends on the implementation (naturally).
>Does the standard say?
A conforming implementation must accept a program containing 509 characters
in a logical source line. A "logical source line" is what results after
lines ending in a \ are spliced with the following physical source line.
Constraints on physical source line length are left up to various
implementations; I wouldn't recommend relying on more than 80 characters
(not counting newline).
>Do present compilers care?
Certainly many of them do.
More information about the Comp.lang.c
mailing list