To: J3 J3/19-138 From: Dan Nagle Subject: Specification and Edits for longer statements Date: 2019-February-11 Reference: 18-253r3, 18-007r1 1 Introduction The longer line and statement was approved for further work at 217. This paper attempts to craft specifications. Since there is no syntax to choose, this paper also attempts to craft edits. 2 Discussion At 217, the choice was made to allow source lines of up to a processor-dependent length, with a minimum of 10K characters. Whether this meant 10*1024 or 10^4 was left unspecified. Likewise, the overall statement length was 1M characters, but it was left unspecified whether this means 1024*1024 or 10^6. This paper uses 10^4 (ten thousand decimal) and 10^6 (one million decimal), respectively. These are human-facing numbers, so even decimal counts are preferred. Implementors are free to offer slightly larger limits. A processor need not report a line that is too long, since the limit is explicitly processor-dependent. High quality implementations will report lines longer than the standard-specified limit, at least when requested. Continuation is left unchanged, except that the limit of 255 is removed. 3 Specifications If a source line consists solely of default characters, the maximum length is processor-dependent, but the processor must allow at least 10000 (ten thousand) characters. If a source statement consists solely of default characters, the maximum length is 1000000 (one million) characters. Processors are no longer required to report too-long lines as the limit is explicitly processor-dependent. Continuation is unchanged, except that the limit of 255 is removed. 4 Edits to 18-007r1 { add remark to Introduction in the bullet item for Source form } [xiii] add "Limits of line lengths and statement lengths have been increased to ease requirements on automatic code generators, preprocessors, and some manual source editing tasks." { Introduction briefly describes new features } { change line length } { 6.3.2.1 Free form line length } [49:13-14p1] in the sentence "If a line consists entirely of characters of default kind (7.4.4), it shall contain at most 132 characters." change "at most 132 characters." to "at most a processor-dependent number of characters; this number shall not be less than 10000." so the resulting sentence reads: "If a line consists entirely of characters of default kind (7.4.4), it shall contain at most a processor-dependent number of characters; this number shall not be less than 10000." { new line length rule } { change statement length } { 6.3.2.6 Free form statements } [50:30p2] replace the sentence "A statement shall not have more than 255 continuation lines." with the sentence "If a statement consists entirely of characters of default kind (7.4.4), the statement shall not have more than 1000000 characters." and add the sentence "Otherwise, the maximum number of characters is processor-dependent." so the resulting p2 reads "If a statement consists entirely of characters of default kind (7.4.4), the statement shall not have more than 1000000 characters. Otherwise, the maximum number of characters is processor-dependent." { new statement length rule } { remark in processor dependencies } { A.2 Processor dependencies } [518:28] after "the maximum number of characters allowed on a source line containing characters not of default kind (6.3.2, 6.3.3);" [518:28+] add "the maximum number of characters allowed on a source statement containing characters not of default kind (6.3.2);" { update processor-dependencies } { end }