Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!ucsd!rutgers!cmcl2!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Max line length (was Re: programming challenge ...) Message-ID: <9843@smoke.BRL.MIL> Date: 13 Mar 89 04:35:20 GMT References: <2102@jasper.UUCP> <207600017@s.cs.uiuc.edu> <9777@bloom-beacon.MIT.EDU> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 17 In article <9777@bloom-beacon.MIT.EDU> jfc@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.