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 

Compilation FORTRAN program written in IV or 66 Version

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



Joined: 26 Mar 2020
Posts: 2

PostPosted: Wed Jun 17, 2020 3:04 pm    Post subject: Compilation FORTRAN program written in IV or 66 Version Reply with quote

Many years before I had written programs in FORTRAN IV or 66 version. These programs were performing perfectly and have used for various projects in the past.

Presently, I am not in the position to compile this program in FTN95.

The compilation errors are mainly of following nature

The errors are typical “Syntax Errors” and mainly due to the “Syntax” as per earlier versions

I have observed errors are mainly as follows

1) “Input / Output” file connection

2) Continuation statement having “1” in column no 6

3) Logic with “GO TO Statement” , that is the number in row “1 to 5”

I am reading lot of books as well as literature to debug these errors, however not in the position to find an easy solution.

I am submitting 14 error messages for review.

“Microsoft Windows [Version 10.0.18363.836]

(c) 2019 Microsoft Corporation. All rights reserved.



C:\Program Files (x86)\Silverfrost\Tutorial>FTN95 Rut.f95.for /CHECKMATE

[FTN95/Win32 Ver. 8.50.0 Copyright (c) Silverfrost Ltd 1993-2019]

0001) 00100 DIMENSION A(200),B(200),C(200),D(200),X(200),Y(200),BEND(200),

WARNING - Line has been truncated (line is longer than 72 characters)

*** Unpaired right bracket(s)

0002) 00200 *R(200),XP(200),YP(200),TS(200),TD(200),VEV(200)

*** Invalid character '*' at start of line

*** Statement not recognised

0004) 00400 DIMENSION CIM(2),FIM(2), AI(2),BI(2),CI(2),DI(2),EI(2),FI(2)

*** Unpaired right bracket(s)

0013) 01220 OPEN (UNIT=6,FILE='RUT.OUT',ACCESS='SEQOUT',

*** Unpaired right bracket(s)

0014) 01240 1DEVICE='DSK' )

*** Unpaired right bracket(s)

0015) 01260 OPEN (UNIT=5,FILE='RUT.INP',ACCESS='SEQIN',

*** Unpaired right bracket(s)

0016) 01280 1 DEVICE='DSK' )

*** Unpaired right bracket(s)

0020) 01600 150 CONTINUE

*** Invalid character '1' at start of line

0022) 01800 6666 DO 100 I=1,200

*** Invalid character '6' at start of line

0033) 02900 100 Y(I)=0.

*** Invalid character '1' at start of line

0037) 03300 5 CONTINUE

*** Invalid character '5' at start of line

0046) 04020 578 FORMAT ('1',///,24X,'*',/,22X,'*',1X,'*',/,20X,'*',3X,'*',/,18X,

*** Unpaired right bracket(s)

*** Too many errors

14 ERRORS [Rut.f95.FOR] - Compilation failed.”

Can any one help me to resolve these errors?

Regards

Uday
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1430

PostPosted: Wed Jun 17, 2020 4:08 pm    Post subject: Reply with quote

Please post/provide the whole code, not just the lines that contain errors. Instead of posting the code inline as text, use the Code button as follows.

Starting with a fresh line, enter the code, and select the entire code. With the code selected, press the Code button. You will see the body of the code surrounded by "code" and "/code" markups.

If the code is larger than about 100 lines, a different method will need to be used. Zip the code, upload the zip file to a cloud server such as Dropbox, Google Drive, Onedrive, etc. Make the uploaded file open to public access, obtain a link, and post the link here.

Once we have the code available, one of us will certainly try to help you to make it work with FTN95.

Note: The lines that you displayed appear to contain a sequence number at the beginning of each line. Those sequence numbers (not to be confused with statement labels) are not part of standard Fortran and will not be accepted by FTN95.


Last edited by mecej4 on Wed Jun 17, 2020 4:30 pm; edited 1 time in total
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Wed Jun 17, 2020 4:29 pm    Post subject: Reply with quote

The Fortran code will be "fixed" format so the program files should have the .for extension or you should use /FIXED on the FTN95 command line.
Back to top
View user's profile Send private message AIM Address
LitusSaxonicum



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

PostPosted: Wed Jun 17, 2020 5:19 pm    Post subject: Reply with quote

Uday,

I'm sitting at home bored with Covid lockdown. I've sent you a Private Message with my e mail address. If you want to send me the source code file I will get the errors out for you and explain why you got them.

Eddie
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1451
Location: Aerospace Valley

PostPosted: Fri Jun 19, 2020 2:51 pm    Post subject: Reply with quote

those 'sequence numbers' that mecej4 refers to look like LINE NUMBERS to me
Try removoing the first 5 (or 6 ) columns from the file if they are
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "
Back to top
View user's profile Send private message
LitusSaxonicum



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

PostPosted: Fri Jun 19, 2020 3:15 pm    Post subject: Reply with quote

Hi John,

Yes, they are. Done that. Then there are TABs. And other things - pretty much dealt with now.

Eddie
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1451
Location: Aerospace Valley

PostPosted: Fri Jun 19, 2020 8:07 pm    Post subject: Reply with quote

oops sorry Eddie, my comment was meant for uday
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "
Back to top
View user's profile Send private message
Robert



Joined: 29 Nov 2006
Posts: 352
Location: Manchester

PostPosted: Thu Jun 25, 2020 11:37 am    Post subject: Reply with quote

Do we know is this was resolved?
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: Thu Jun 25, 2020 12:03 pm    Post subject: Reply with quote

Hi Robert,

I resolved it for him. Sometimes old programs written in Fortran 66 times have some bizarre constructs suited only to one particular compiler.

Eddie
Back to top
View user's profile Send private message
Robert



Joined: 29 Nov 2006
Posts: 352
Location: Manchester

PostPosted: Thu Jun 25, 2020 12:17 pm    Post subject: Reply with quote

Nice work Eddie
Back to top
View user's profile Send private message Visit poster's website
uday_deshpande



Joined: 26 Mar 2020
Posts: 2

PostPosted: Thu Jun 25, 2020 12:22 pm    Post subject: Reply with quote

Robert wrote:
Nice work Eddie


Eddie did excellent work in guiding me to convert very old FORTRAN programs and compile.
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