home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.fortran      Putting John Backus on a giant pedestal      5,127 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 4,613 of 5,127   
   Gary Scott to Lawrence D'Oliveiro   
   Re: Implicit Semicolons And Statement-Co   
   06 Feb 24 10:58:20   
   
   From: garylscott@sbcglobal.net   
      
   On 2/5/2024 9:04 PM, Lawrence D'Oliveiro wrote:   
   > Fortran (in free-form mode) is now the third language I’ve come across   
   > that allows semicolons to terminate statements, but makes them   
   > optional (letting a newline do the job instead).   
   >   
      
   SNIP   
      
   > Free-form Fortran, on the other hand, requires an explicit “&” to   
   > continue a line in all cases:   
   >   
   >      character(len = 9), dimension(3, 4), parameter :: month_names = &   
   >          reshape &   
   >            ( &   
   >              (/ ' January ', ' February', '  March  ', '  April  ', &   
   >              '    May  ', '   June  ', '   July  ', '  August ', &   
   >              'September', ' October ', ' November', ' December' /), &   
   >              (/3, 4/) &   
   >            )   
   >   
   > Wouldn’t it be useful if it had a smarter, Python-style rule?   
      
   I'm not a fan of this style myself, I would probably alter this to be a   
   little less verbose and to use longer line lengths.  Unfortunately, my   
   posting setting don't allow long line lengths (easily) for posting here.   
     So I'd probably use longer lengths than below resulting in only 2   
   lines.  I definitely hate breaking out parentheses on separate lines.   
   These are argument/parameter/initializer groupings, not code block   
   separators.   
      
   character(9), parameter :: month_names(3,4) = reshape((/'January', &   
     ' February', '  March  ', '  April  ', '    May  ','   June  ',   &   
     '   July  ', '  August ', 'September', ' October ', ' November',  &   
     ' December' /), (/3, 4/))   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca