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 

error messaging
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
offthechart



Joined: 04 Dec 2013
Posts: 17

PostPosted: Mon Jun 22, 2020 10:48 pm    Post subject: Reply with quote

OK Mr. C and mecej4, here is some info.
First I created ftn95.cfg (I have never had one created) with options;
/BRIEF
/ERRORLOG
/LIST

Then compiling on the Command line I get a file created on disk -- filename.lis
It has my 2 induced errors and prints out a file with the full source code and:

0022 write(6,"(' Enter the 1" in. aluminum disk radius (in): ',$)")
ERROR C:\...\tempnewsilverfrst\filename.F 22: Unterminated character constant

and also,

0079 do i = 1,..ltot-1
ERROR C:\......\tempnewsilverfrst\filename.F 79: There is no declaration for user-defined operator '..'

Success.

Note that it takes, ftn95 filename.f/brief to get line numbers showing up in the Command prompt window. Otherwise my Command window does not display error line numbers.

Otherwise, I do not know exactly what else you might wish to see. I am not well versed in the ins and outs of compiler operation. I am a retired (13 years) engineer that specialized in structural dynamics, spectral analysis and finite element theory. I wrote many thousands of lines of code to turn physics into numbers. I still enjoy writing. Thanks for your help. If you need more info I will try.
Back to top
View user's profile Send private message
John-Silver



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

PostPosted: Tue Jun 23, 2020 12:16 am    Post subject: Reply with quote

Try WITHOUT the /ERRORLOG and WITHOUT /LIST and see what is produced in the command line window
_________________
''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
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Tue Jun 23, 2020 9:04 am    Post subject: Reply with quote

I am having trouble understanding this thread.

I can not reproduce your problem with the line of code identified producing an error message as you describe or failing to identify the line number.

My example code (which hopefully identifies a fix to your problem is
Code:
      write(*,"(' Enter the 1" in. aluminum disk radius (in): ',$)")
      write(*,"(' Enter the 1"" in. aluminum disk radius (in): ',$)")
      end

I went back to FTN95 Version 7.00 and used the compile option
Code:
ftn95 filename.f

my ftn95.cfg file is
Code:
/ERROR_NUMBERS
/IMPLICIT_NONE
/INTL
/LOGL


The compiler response is
Code:
[FTN95/Win32 Ver. 7.00.0 Copyright (c) Silverfrost Ltd 1993-2013]
     Licensed to:  John Campbell
     Organisation: xxxxxxxxx

0001)       write(*,"(' Enter the 1" in. aluminum disk radius (in): ',$)")
*** Error 70: Unterminated character constant
    1 ERROR  [<main program> FTN95/Win32 v7.00.0]
*** Compilation failed


If I use ftn95 filename.f /brief, I get
Code:
[FTN95/Win32 Ver. 7.00.0 Copyright (c) Silverfrost Ltd 1993-2013]
     Licensed to:  John Campbell
     Organisation: xxxxxxxxx

ERROR c:\temp\filename.F 1:  70: Unterminated character constant
    1 ERROR  [<main program> FTN95/Win32 v7.00.0]
*** Compilation failed

In both cases, line 1 is identified as the error line.
Without /brief, the error line of code is identified and listed.
By including /brief /errorlog, the error is also listed in filename.ERR as:
Code:
ERROR c:\temp\filename.F 1:  70: Unterminated character constant


The line number is always identified.

Also, what is "do i = 1,..ltot-1" ?
Is .. copying PLATO's representation of 2 blanks ?
Quote:
Otherwise, I do not know exactly what else you might wish to see. I am not well versed in the ins and outs of compiler operation. I am a retired (13 years) engineer that specialized in structural dynamics

We would like to see the code, so we could attempt to reproduce your problem. I am also an engineer that specializes in structural dynamics so I don't think that relates to the problem being reported.
Back to top
View user's profile Send private message
offthechart



Joined: 04 Dec 2013
Posts: 17

PostPosted: Tue Jun 23, 2020 4:25 pm    Post subject: Reply with quote

John C. I intentionally created the errors to check compiling! I realize there should not be .. in the do statement. /brief cures the problem. Without it, the command window does not give line numbers for errors. My previous post of yesterday explains the solution with creation a .CFG file that listed all source code with errors (in filenam.lis) displayed following the incorrect code statement.
Back to top
View user's profile Send private message
John-Silver



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

PostPosted: Tue Jun 23, 2020 6:18 pm    Post subject: Reply with quote

the source of your observed 'no line number' can only be due to the presence of /ERRORLOG and/or /LIST

Try what i uggested previously above to try to pinpoint it
_________________
''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
offthechart



Joined: 04 Dec 2013
Posts: 17

PostPosted: Tue Jun 23, 2020 6:47 pm    Post subject: Reply with quote

Yes John Silver. I removed both options you noted and the compile error line number did show up in the Command window. The only option in my .cfg file was reduced to /BRIEF However without /BRIEF, the line number does not show up in the Command window. Oh well. I am quite satisfied I have a working method to obtain useful error messages. Thanks for the inputs.
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Wed Jun 24, 2020 3:51 am    Post subject: Re: Reply with quote

offthechart wrote:
However without /BRIEF, the line number does not show up in the Command window.

I do not agree with this claim. The offending line + line number appears without /brief.
My experience is that it is preferable to not use /brief and until a working example is provided to demonstrate line numbers are not provided, I would recommend ignoring ofthechart's recomendations.

( I prefer to also use /ERror_numbers to better identify the errors and warnings. It is also useful, should use of /IGnore be required )
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Wed Jun 24, 2020 10:33 am    Post subject: Reply with quote

I agree with John C's comment, with one caveat: the next-to-zero chance that Offthechart's licensed version of FTN95 7.0 hides line numbers whereas the personal versions of 6.35, 7.0, 7.2 and 8.62 that I used do not hide line numbers.
Back to top
View user's profile Send private message
offthechart



Joined: 04 Dec 2013
Posts: 17

PostPosted: Wed Jun 24, 2020 4:01 pm    Post subject: Reply with quote

OK gang, here goes for the last time. For whatever &^$^* reason, /ftn95 filename.f in my command window does not show error line numbers. I am not an unobservant idiot. As a previous long time analyst in the defense world and member of the Triplenine society, not much gets by me.

Get it? I don't know why, but that is what occurs when I compile. When I add /BRIEF line numbers show up in the command window. Great. When I create a ftn95.cfg file with /LIST included I get a full source file printout (filename.lis) with the error message following each errant statement. Excellent. I don't have the slightest idea about the inner workings of the maze named Silverfrost, but in general I am quite pleased with it.

I do not have a licensest version as I only create code at home when the desire strikes me. For example, a retired math friend wished to solve polynomial equations with complex coefficients. I discovered the Laguer method and successfully coded it. Or a barroom question: I wonder how much farther a home run travels in Denver versus San Francisco? Having discovered Internet data on drag and lift (Magnus) coefficients, off I went into the land of numerical integration. Keeps my 75 year-old mind working. Thanks for help y'all.
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Thu Jun 25, 2020 3:39 am    Post subject: Reply with quote

OK ofthechart, here goes for the last time!

Can you:
# generate a minimum reproducer: filename.f,
# a .bat file that demonstrates the different performance which looks like below then
# run the .bat to display the different error report formats,
# attach the relevant files to help identify the problem.
Code:
dir > filename.tce
ftn95 filename.f "bad options that omit the line numbers" /echo >> filename.tce
ftn95 filename.f "good options that include the line numbers" /echo >> filename.trace
dir >> filename.tce

Could you also list the .bat, .tce and ftn95.cfg, or preferably include these in a .zip file, together with filename.f and best provide this as a lnk to dropbox or similar.

It would be best to provide filename.f as a link, so we can inspect the .f file for any unexpected characters that may be causing the problem (eg for unix or other non Dos/ansi characters)

I have already suggested a way of eliminating the error, should that be a useful way forward.

It would be good to get an explanation for this behaviour.

John
Back to top
View user's profile Send private message
offthechart



Joined: 04 Dec 2013
Posts: 17

PostPosted: Thu Jun 25, 2020 5:47 pm    Post subject: Errors etc. Reply with quote

Hello JohnC. First I appreciate your knowledgable technical concern (and curiousity). Thinking upon the problem last night, there is a possible variable that affects the default error message 'problem'. I utilize a particular text editor for the creation and editing of most files, including Fortran source code. Of course, I have set up my editor to make editing life easier with various 'hot keys'. I have not utilized the specialized .F editing program that is available to create code.

I don't know if this is significant but my my understanding of Murphy's Law makes me suspicious. I could send you the source code text, but doubt it would be of value. ( I wrote it as a generic method for a friend who needed to know the response of a disk to intermittent torque pulses and the effects of static friction. It was up to him to modify it in any way for his particular purposes.)

Below is a file "fvars.bat" that has existed on disk since I downloaded the compiler. I question its value to you also. Thanks.


@echo off
echo.
echo Setting Environment for FTN95 for Microsoft .NET and Win32
echo.
SET PATH=C:\Windows\Microsoft.NET\Framework\v2.0.50727\;%PATH%
SET PATH=C:\Program Files (x86)\Silverfrost\FTN95;%PATH%
SET F95INCLUDE=C:\Program Files (x86)\Silverfrost\FTN95\Include
SET MOD_PATH=C:\Program Files (x86)\Silverfrost\FTN95\Include
Back to top
View user's profile Send private message
John-Silver



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

PostPosted: Thu Jun 25, 2020 7:00 pm    Post subject: Reply with quote

a stupid suggestion but a quick check to see if it's anything to do with using a ;cfg file ...
Try temporarily 'deleting' the .cfg file (by modifying the extension with some crazy arbitrary text for example,
... then run your prog from command line and see what happens.
_________________
''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
offthechart



Joined: 04 Dec 2013
Posts: 17

PostPosted: Thu Jun 25, 2020 9:28 pm    Post subject: Reply with quote

I did that. With an induced error I got in the command window:

*** unpaired right brackets
1 error [ <main program> ftn95/win32 v7.00.0]
*** compilation failed

As usual, nothing more. It's only the .cfg file that gives me the correct line numbers help that is needed! At least I have a solution to the problem by using a .cfg file. When I use a .cfg file I get:

error C:\.............\filename.f 22: unpaired right brackets
1 error [ <main program> ftn95/win32 v7.00.0]
*** compilation failed

Note the line number '22'. !!
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 -> General All times are GMT + 1 Hour
Goto page Previous  1, 2
Page 2 of 2

 
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