forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FTN95 fails to generate error for duplicate labels

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
Kenneth_Smith



Joined: 18 May 2012
Posts: 378
Location: Hamilton, Lanarkshire, Scotland.

PostPosted: Sat Jul 04, 2020 11:40 pm    Post subject: FTN95 fails to generate error for duplicate labels Reply with quote

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
View user's profile Send private message Visit poster's website
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2187
Location: Yateley, Hants, UK

PostPosted: Sun Jul 05, 2020 3:14 pm    Post subject: Reply with quote

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
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1430

PostPosted: Mon Jul 06, 2020 7:52 am    Post subject: Reply with quote

Algol 60 lacked standard I/O, so one has to stoop to something!

"Algol 60 at 60": https://www.theregister.com/2020/05/15/algol_60_at_60/
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 6593
Location: Salford, UK

PostPosted: Mon Jul 06, 2020 9:11 am    Post subject: Reply with quote

Ken

Thank you for the bug report which I have logged.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 6593
Location: Salford, UK

PostPosted: Tue Jul 07, 2020 10:36 am    Post subject: Reply with quote

This bug has now been fixed for the next release of FTN95.
Back to top
View user's profile Send private message AIM Address
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2187
Location: Yateley, Hants, UK

PostPosted: Tue Jul 07, 2020 11:20 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group