From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,8143b93889fe9472 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.66.85.168 with SMTP id i8mr1788470paz.21.1359685477933; Thu, 31 Jan 2013 18:24:37 -0800 (PST) Path: s9ni28772pbb.0!nntp.google.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeed.news.ucla.edu!news.snarked.org!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: Ada standard and maximum line lengths Date: Sun, 27 Jan 2013 23:28:42 -0700 Organization: Also freenews.netfront.net; news.tornevall.net Message-ID: References: <8dfcf819-e1d0-4578-a795-a4bf724b5014@googlegroups.com> Mime-Version: 1.0 Injection-Date: Mon, 28 Jan 2013 06:28:36 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="656ea2f23126f57fb36504d2d15a002c"; logging-data="5430"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19TgXLFhliFNtbvQVLeex/xG9cn/s6Ntww=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: <8dfcf819-e1d0-4578-a795-a4bf724b5014@googlegroups.com> Cancel-Lock: sha1:l5OfSi7A0q4QaySK2NubWuGvYQY= Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2013-01-27T23:28:42-07:00 List-Id: On 01/27/2013 10:02 PM, Lucretia wrote: > > I was reading the Ada 2012 standard and found this, I was just wondering why > there is a maximum line length, it's not like we parse the language a line at > a time. Why not just accept it as a stream of tokens and if there are line > breaks, ignore? I presume that by "this", you're referring to ARM 2.2, where it says: "An implementation shall support lines of at least 200 characters in length, not counting any characters used to signify the end of a line. An implementation shall support lexical elements of at least 200 characters in length. The maximum supported line length and lexical element length are implementation defined." This does not impose a maximum line length; it imposes a minimum value for the maximum line length a compiler must accept. An implementation is free to accept lines of any length greater than this minimum length that it chooses, including no maximum line length. But since the maximum line length chosen by a compiler also defines the maximum identifier length accepted by the compiler, and few compilers are willing to accept identifiers of any length, most compilers will impose a maximum line length. The importance of a minimum value for the longest line a compiler must accept in the standard is that it allows portable programs to be written. By not exceeding 200-character lines, even if your compiler will accept them, you know that your program will be accepted by any compiler. -- Jeff Carter "If a sperm is wasted, God gets quite irate." Monty Python's the Meaning of Life 56