From: antispam@fricas.org   
      
   Lawrence D'Oliveiro wrote:   
   > On Thu, 17 Apr 2025 08:56:17 -0400, Arne Vajhøj wrote:   
   >   
   >> If we discuss what is the "right" answer, then I would actually say 2.   
   >>   
   >> for i := 1 to 10 do writeln(i)   
   >>   
   >> for i := 1 to 10 do   
   >> writeln(i)   
   >>   
   >> for i := 1 to 10 do begin   
   >> writeln(i)   
   >> end;   
   >>   
   >> for i := 1 to 10 do begin   
   >> writeln(i)   
   >> end;   
   >>   
   >> for(i = 1; i <= 10; i++) printf("%d\n", i);   
   >>   
   >> for(i = 1; i <= 10; i++)   
   >> printf("%d\n", i);   
   >>   
   >> for(i = 1; i <= 10; i++) {   
   >> printf("%d\n", i);   
   >> }   
   >>   
   >> for(i = 1; i <= 10; i++)   
   >> {   
   >> printf("%d\n", i);   
   >> }   
   >>   
   >> I would say 2 for all.   
   >   
   > How much difference would such distinctions make in real-world code,   
   > anyway? I suspect not much. Longer compound statements would dominate   
   > shorter ones in the line count.   
      
   I would expect about 20% difference. I saw a case when lead developer   
   thought that code is "takes too much vertical space" and spent   
   substantial effort to reformat it. IIRC on files having few thousends   
   lines he made files shorter by about 10-15%. IIRC he changed code   
   formatting, keeping comments mostly as-is. Also, he worked within   
   mandated GNU brace placement rule, theoretically files could be   
   shortened more by switching to more compact brace placement rule.   
      
   --   
    Waldek Hebisch   
      
   --- SoupGate-DOS v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|