![]() ![]() > The following is the perspective of someone first learning Fortran. > As far as I can tell the 'call for proposals' for Fortran 202x is closed, but if On Monday, Jat 10:55:03 PM UTC+10, Evert Provoost wrote: Literals and (3) is an extension to edit descriptors in READ statements. (2) is a proposal for a more general syntax for array (See the first two comments under Miscellaneous on page 18 of N2147:įor those coming to the discussion at a later time: do note that this is only ![]() The main goal here is to keep both the ones that want full backwardsĬompatibility and those that want a leaner Fortran happy whilst also (somewhat)Įasing compiler development: by simply stating the standard that is being used. Probably do so) to keep supporting older Fortran versions. This way writing a new Fortran compiler can also become somewhat easier as 'supporting old versions' isn't part of the standard any more, however compilers can choose (and most will Option) without breaking old code as that code wouldn't start withĪnd is thus written in an older version of Fortran. This way we can,Īs a welcome example, make IMPLICIT NONE the default (or even the only available Valid, say, Fortran 2021 programs to start with `FORTRAN 2021`. The way I thought of it was like gfortran's -std flag. I also think that would be an opportunity for someone to develop a suite of refactoring tools (maybe based on AI or deep learning) that can translate old sphagetti code into something more structured and modern looking.Īs gah4 noted the main proposal was to add a version specifier statement. Maybe even call it something other than Fortran :>) if thats what it takes to get more people to try it. I personally would love to see someone "fork" Fortran and remove all support for everything that has been officially deleted or declared obsolete (like the F compiler project tried to do) throught the F2018 standard. The perception will persist that Fortan is only good for compiling old code and thats the only legitimate reason to keep it alive. Unfortunately, I think its also one of the things that might be its eventual downfall. Yes, the ability to compile legacy code is one of Fortran's great strengths. As to breaking old code, I think maybe its time to start giving more emphasis to the new features in Fortran than slavishly trying to support 60 year old code. A couple of small changes I would like to see though is to allow it to precede USE statements and maybe inherited from modules. I think having IMPLICIT NONE as a default for free-form code would be a good idea. Which would accept '' but not, for instance, '19-006-', ''Ĭases like '(I(1,), "00")' do pose an issue as to how these should be Writing: I(1,), any integer would be accepted.Ī string literal in the format of a READ would simply be interpreted as a ![]() For instance, a integer between 1 and 9ĭigits wide could be specified as I(1,9). ![]() One way of doing this is to add a range option to the width in an editĭescriptor by adding a (lo,hi) syntax. This would, as far as I can tell, make READ as, and even more, useful as C's Which is different from the memory layout of Fortran an thus also the wayĪlternatively could representģ) Extending the format syntax to also allow variable width numbers and string One issue with this syntax is of course that the values are given row major, This could even be extended to more complex arrays by, for instance, repeating INTEGER, DIMENSION(2, 2) :: A = TRANSPOSE(RESHAPE(, )) This is mostly a quality of life thing, but something like A compiler could also give warnings about better ways to do things Would break very old code but not modern practice. This would also allow standards to include changes that This way a compiler doesn't have to guess whether a file is for instance inįixed or free format. The 'version specifier' would be a line at the start of a file eg. Might be naive or even borderline ignorance (in which case: please do call meĪnyway, here are a couple of ideas for the next (or later) Fortran standard:ġ) Add a 'version specifier' (and make 'IMPLICIT NONE' the default). This of course also means that some of these proposals My personal experience beginners tend to notice quirks and some possible The following is the perspective of someone first learning Fortran. As far as I can tell the 'call for proposals' for Fortran 202x is closed, but if ![]()
0 Comments
Leave a Reply. |