 |
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Tue Mar 12, 2013 10:12 am Post subject: |
|
|
It turns out that the code for this particular option was missing.
The other /SET_MESSAGE_TO_ options appear to work.
They can, in fact, be issued directly from the command line without using an options file.
I can fix this but maybe not in time for the next release. |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Tue Mar 12, 2013 3:24 pm Post subject: |
|
|
This bug has now been fixed for the next release. |
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2923 Location: South Pole, Antarctica
|
Posted: Tue Mar 12, 2013 8:41 pm Post subject: |
|
|
Thanks, Paul. Please consider making that warning an error by default, i bet almost everyone here with large codes (specifically written by someone else) have truncation errors and even do not know about that. I fixed not less then 100 of truncations last year just in one single third-party code (it was written for non-FTN95 compiler, the FTN95 would find that easily with /undef but again, not everyone use or even know that. Even i myself despite of being fan of /undef and even claiming that your code is definitely wrong until it passed /undef, tend to avoid it to the last point when nothing go because it is so really truly abusive by telling me straight into the face how many dumbest mistakes i make LOL )
Also, i have to stress again the point shown above, i do not know if you have missed it or not, that for anything placed into 73d position, even the exclamation mark, compiler issues truncation warning. The most interesting is that exclamation mark in 72d position gives no warning, in 74th position gives no warning but in 73d it warns.
That will become a real issue after this bug fix. There are a lot of comments in the codes starting with 73d position, like mentioned above ancient punchcard indexing to modern codes where people use exclamation mark in 73d position because it is next after tab. If i will have time i will run the filter to find how many such comments in the codes i use but bet the number is in hundreds
Last edited by DanRRight on Wed Mar 13, 2013 5:10 pm; edited 1 time in total |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Wed Mar 13, 2013 9:28 am Post subject: |
|
|
Thanks. I will log the problem about the exclamation mark in column 73. |
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2923 Location: South Pole, Antarctica
|
Posted: Thu Mar 14, 2013 10:22 pm Post subject: |
|
|
Just wrote separate small code which counts exclamation marks in 73d position
Code: | integer*2 maxNumbFiles_InDir, NumbFiles_InDir, Error_codeDb
parameter (maxNumbFiles_InDir = 8000)
character*128 FILES_InDir(maxNumbFiles_InDir)
integer*2 ATTR_files(maxNumbFiles_InDir),date_files(maxNumbFiles_InDir), time_files(maxNumbFiles_InDir)
integer file_size(maxNumbFiles_InDir)
character textsample*128, text256*256
textsample= '*.f*'
FILES_InDir(:)=' '
call files@ (textsample, NumbFiles_InDir, maxNumbFiles_InDir, FILES_InDir, ATTR_files, date_files, time_files, file_size)
print*, 'NumbFiles_InDir=',NumbFiles_InDir
! print*, FILES_InDir
iExclCount = 0
nLinesOfFortranCode = 0
do i=1, NumbFiles_InDir
open (111,file=FILES_InDir(i), err=994, status='old' )
do j=1,1000000
read (111,'(a)',err=995,end=3333) text256
nLinesOfFortranCode = nLinesOfFortranCode + 1
if(text256(73:73).eq.char(33)) then
iExclCount = iExclCount + 1
endif
enddo
3333 continue
enddo
print*, 'Total lines of Fortran code=', nLinesOfFortranCode
print*, 'Number of exclamation marks in 73d position=', iExclCount
goto 1000
994 print*, ' can not open file=',FILES_InDir(i)
goto 1000
995 print*, ' Error reading the file=',FILES_InDir(i)
goto 1000
1000 continue
end
|
and got
NumbFiles_InDir= 189
Total lines of Fortran code= 1611952
Number of exclamation marks in 73d position= 1342
So this issue if not fixed will be truly killing us! Please look at it and resolve it in the same release!
You can modify the code to count anything starting with 73 position since it will give an error too. Or to give the same stats for 133 position. What is your statistics ?
( You can also check how many Clearwin+ % codes have been used in your program -- %=char (37) -- or how many thousand times you wrote keyword winio@ LOL. Another modification of this program gives you information if your code has error by hitting beyond 72 positions etc. All that is implemented in our larger code) |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Fri Mar 15, 2013 7:01 am Post subject: |
|
|
I am not sure if this will be of any help but there is a relatively new command line option /NO_TRUNCATE that leads to an error message for truncated lines. |
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2923 Location: South Pole, Antarctica
|
Posted: Fri Mar 15, 2013 7:31 am Post subject: |
|
|
OOps, how we could miss that? That's what i call devilry, and now the whole forum is bewitched ROTFL ...damn, i looked several times, even with electronic search, unbelivable!
That command is exactly what we need.... My gray matter compiler makes such mistakes i can not believe...clearly it is analog, not digital LOL
Well, yes, unfortunately when I tried using it the lines with the comments with exclamation marks this time in ANY position looking like these, gave me may be 100000 "errors" where there are actually none:
Code: | integer, parameter :: N_mprpx=n_n*N_m,nxydim=max(50000,N_mprpx) ! 100000 ! 200000 bef 20050515 |
A lot of legitimate lines with less then 73 positions also gave me errors i do not know why, may be 8-space tab is incorrectly interpreted.
Code: | common /refrindex/ WL_RAY_1, wl__2_reonpi, k_whos_anal_lrmm1234, |
Please look at this switch from your side why it behaves this way, it is hard to believe that's just such obvious compiler bug, or the compiler was offended by the name of variables like the last one. LOL |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Wed Mar 27, 2013 6:30 pm Post subject: |
|
|
I have fixed the problem about getting a warning when an exclamation mark appears in column 73. This fix will be included in the next release (after 6.35). |
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2923 Location: South Pole, Antarctica
|
Posted: Thu Mar 28, 2013 12:37 pm Post subject: |
|
|
Thanks, Paul. Will be happy to betatest the fix on our million lines codes, since there were a lot of other false positives, some did not even have the exclamation marks at all |
|
Back to top |
|
 |
|
|
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
|