View previous topic :: View next topic |
Author |
Message |
Kenneth_Smith
Joined: 18 May 2012 Posts: 697 Location: Hamilton, Lanarkshire, Scotland.
|
Posted: Sat Jul 04, 2020 11:40 pm Post subject: FTN95 fails to generate error for duplicate labels |
|
|
A trivial example, but at least two other fortran compilers reject this code due to duplicate labels:-
Code: | program test
loop1 : do i = 1, 10, 1
print*, i
end do loop1
loop1 : do i = 1, 10, 1
print*, i
end do loop1
end program test |
So I can compile and run this contrived code in FTN95 - and start a debate about where the exit statements should jump to:-
Code: | program test
loop1 : do i = 1, 10, 1
loop1 : do j = 1, 10, 1
print*, i, j
if (j .eq. 5) exit loop1
end do loop1
if (i .eq. 2) exit loop1
end do loop1
end program test |
|
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Sun Jul 05, 2020 3:14 pm Post subject: |
|
|
I've seen the quote that you can write Fortran in any language, but this is the first time I've seen Algol written in Fortran!
Eddie |
|
Back to top |
|
|
mecej4
Joined: 31 Oct 2006 Posts: 1886
|
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Mon Jul 06, 2020 9:11 am Post subject: |
|
|
Ken
Thank you for the bug report which I have logged. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Tue Jul 07, 2020 10:36 am Post subject: |
|
|
This bug has now been fixed for the next release of FTN95. |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Tue Jul 07, 2020 11:20 am Post subject: |
|
|
Quote: | Algol 60 lacked standard I/O |
So true, but did it matter when the Algol on various manufacturers' machines was so different anyway? (Notably in the way that reserved words were highlighted).
And although Fortran IO was standard, the concentration on making it look like Algol* stopped progress (if any was envisaged) on graphics and other than primitive user interfaces until FTNxx, starting with DBOS and then with CW+.
Eddie
*long source code lines, getting rid of statement numbers, indenting, various loop types, lower case, labels (as in this topic), just to mention a few ...[/quote] |
|
Back to top |
|
|
|