|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
oggyogg Guest
|
Posted: Thu Jul 09, 2015 4:27 pm Post subject: Error 59, There is no repeatable edit descriptor in this f |
|
|
i have this error, a y help plz
Runtime error from program:c:\users\ogchm\desktop\passfem\passfem.exe
Run-time Error
*** Error 59, There is no repeatable edit descriptor in this format
004044b0 TRUS1 [+040d]
00404280 THREDT [+01b5]
004034a0 FELIB [+010c]
00401000 main [+0a8f] |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
Posted: Thu Jul 09, 2015 6:54 pm Post subject: |
|
|
You will need to post the lines of code that relate to the error report. |
|
Back to top |
|
|
JohnCampbell
Joined: 16 Feb 2006 Posts: 2554 Location: Sydney
|
Posted: Fri Jul 10, 2015 8:41 am Post subject: |
|
|
If you compile with /debug, you will then get the line number to indicate what format statement has a problem. It is probably due to a Fortran language extension that is not supported by FTN95 |
|
Back to top |
|
|
rogerh
Joined: 02 Nov 2014 Posts: 46 Location: Longmont, CO
|
Posted: Sat Jul 11, 2015 12:05 am Post subject: |
|
|
I have the same problem with this code
Code: |
12 format ('2a,1x,3a,1x,1a,1x,10a,1x,8a,1x,3a,1x,4a,1x,3a,1x,3a')
nl = 0
lk = 0
DO
read(3,'(55a)',err=10) lin$ ! SIGNAL LINE
write (4,'(55a)') lin$
read(3,*,err=10) lin$ ! LABEL LINE
write (4,'(55a)') lin$
lk = 0
do while (lk <=20)
read (3,*,end=10) v$(1),v$(2),v$(3),v$(4),v$(5),v$(6),v$(7),v$(8),v$(9)
! write (*,12) v$(1),v$(2),v$(3),v$(4),v$(5),v$(6),v$(7),v$(8),v$(9)
WRITE (4,12) v$(1),v$(2),v$(3),v$(4), v$(5),v$(6),v$(7), v$(8),v$(9)
nl = nl+1
lk = lk+1
end do
end do
|
Plato tells me what and where but not why.
Roger |
|
Back to top |
|
|
JohnCampbell
Joined: 16 Feb 2006 Posts: 2554 Location: Sydney
|
Posted: Sat Jul 11, 2015 1:17 am Post subject: |
|
|
You have the incorrect order for A size; it is Aw, as: Code: | 12 format ('a2,1x,a3,1x,a1,1x,a10,1x,a8,1x,a3,1x,a4,1x,a3,1x,a3')
nl = 0
lk = 0
DO
read(3,'(a55)',err=10) lin$ ! SIGNAL LINE
write (4,'(a55)') lin$
read(3,*,err=10) lin$ ! LABEL LINE
write (4,'(a55)') lin$
lk = 0
do while (lk <=20)
read (3,*,end=10) v$(1),v$(2),v$(3),v$(4),v$(5),v$(6),v$(7),v$(8),v$(9)
! write (*,12) v$(1),v$(2),v$(3),v$(4),v$(5),v$(6),v$(7),v$(8),v$(9)
WRITE (4,12) v$(1),v$(2),v$(3),v$(4), v$(5),v$(6),v$(7), v$(8),v$(9)
nl = nl+1
lk = lk+1
end do
end do |
|
|
Back to top |
|
|
rogerh
Joined: 02 Nov 2014 Posts: 46 Location: Longmont, CO
|
Posted: Sat Jul 11, 2015 1:29 am Post subject: |
|
|
That's what I thought but changing it didn't help.
Same error on the "write (4,12) " line.
Roger |
|
Back to top |
|
|
JohnCampbell
Joined: 16 Feb 2006 Posts: 2554 Location: Sydney
|
Posted: Sat Jul 11, 2015 1:41 am Post subject: |
|
|
not in quotes
Code: | character lin$*55, v$(9)*10
integer*4 nl,lk
!
open (unit=13,file='ver510e.tce')
open (unit=14,file='rogerh.tce')
!
12 format (a2,1x,a3,1x,a1,1x,a10,1x,a8,1x,a3,1x,a4,1x,a3,1x,a3,2x,a)
nl = 0
lk = 0
DO
read (13,'(a55)',err=10) lin$ ! SIGNAL LINE
write (14,'(a55)') lin$
read (13,*,err=10) lin$ ! LABEL LINE
write (14,'(a55)') lin$
lk = 0
do while (lk <=20)
read (13,*,end=10) v$(1),v$(2),v$(3),v$(4),v$(5),v$(6),v$(7),v$(8),v$(9)
write ( *,12) v$(1),v$(2),v$(3),v$(4),v$(5),v$(6),v$(7),v$(8),v$(9)
WRITE (14,12) v$(1),v$(2),v$(3),v$(4),v$(5),v$(6),v$(7),v$(8),v$(9)
nl = nl+1
lk = lk+1
end do
end do
10 continue
end |
Still problems, as "read (13,*,..." will not work well |
|
Back to top |
|
|
rogerh
Joined: 02 Nov 2014 Posts: 46 Location: Longmont, CO
|
Posted: Sat Jul 11, 2015 2:06 am Post subject: |
|
|
What I'm trying to do is to reformat text which has only blanks for value separators. Some of the numbers are left justified and longer than the values in the next line making it impossible to do a column decode.
Thus I read with an * and then write with an A3 so the next program can read correctly.
But F95 keeps giving me error 59.
Roger |
|
Back to top |
|
|
JohnCampbell
Joined: 16 Feb 2006 Posts: 2554 Location: Sydney
|
Posted: Sat Jul 11, 2015 3:05 am Post subject: |
|
|
Try it with a text file first and see what you get.
If there are not 9 fields in a line, it will read a second line.
appending \ to a line will terminate the read(..,*)
My successful test was: Code: | character lin$*55, v$(9)*10
integer*4 nl,lk
!
open (unit=13,file='ver510e.tce')
open (unit=14,file='rogerh.tce')
!
12 format (a2,1x,a3,1x,a1,1x,a10,1x,a8,1x,a3,1x,a4,1x,a3,1x,a3,2x,a)
13 format (10(a6,'_'))
nl = 0
lk = 0
DO
read (13,'(a55)',err=10) lin$ ! SIGNAL LINE
write (14,'(a55)') lin$
read (13,*,err=10) lin$ ! LABEL LINE
write (14,'(a55)') lin$
lk = 0
do while (lk <=20)
v$ = '~'
read (13,*,end=10) v$(1),v$(2),v$(3),v$(4),v$(5),v$(6),v$(7),v$(8),v$(9)
write ( *,13) v$(1),v$(2),v$(3),v$(4),v$(5),v$(6),v$(7),v$(8),v$(9)
WRITE (14,12) v$(1),v$(2),v$(3),v$(4),v$(5),v$(6),v$(7),v$(8),v$(9)
nl = nl+1
lk = lk+1
end do
end do
10 continue
end |
Alternatively, you could paste it into excel,
do data > text to column, with space delimited
adjust the column widths
save as a .prn file
if only some lines are to be done, apply a line number column, then sort lines first.
Last edited by JohnCampbell on Sat Jul 11, 2015 3:23 am; edited 2 times in total |
|
Back to top |
|
|
rogerh
Joined: 02 Nov 2014 Posts: 46 Location: Longmont, CO
|
Posted: Sat Jul 11, 2015 3:12 am Post subject: Re: |
|
|
JohnCampbell wrote: | Are there 9 fields in each line ? |
Yes but of varying widths in some cases.
Quote: |
Alternatively, you could paste it into excel,
do data > text to column, with space delimited
adjust the column widths
save as a .prn file
if only some lines are to be done, apply a line number column, then sort lines first. |
No, this has to be done in fortran to fit in with other programs.
I can do it easily in TrueBasic but F95 is giving me fits.
Roger |
|
Back to top |
|
|
JohnCampbell
Joined: 16 Feb 2006 Posts: 2554 Location: Sydney
|
Posted: Sat Jul 11, 2015 3:26 am Post subject: |
|
|
check : read (13,*,err=10) lin$ ! LABEL LINE
this could cause problems as it will read 1 string up to the first blank
a blank LABEL line will take the next line. |
|
Back to top |
|
|
rogerh
Joined: 02 Nov 2014 Posts: 46 Location: Longmont, CO
|
Posted: Sat Jul 11, 2015 5:25 am Post subject: |
|
|
Nope.
Corrected that, no difference.
There are some blank lines at the beginning but F95 doesn't seem to count them.
Roger |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Sat Jul 11, 2015 10:09 am Post subject: |
|
|
Roger,
Show us a line or two of your data please. I'm having difficulty with using a blank to separate character fields. Your post suggests that the data consists of numbers, and if they were, then a different approach would be better. |
|
Back to top |
|
|
JohnCampbell
Joined: 16 Feb 2006 Posts: 2554 Location: Sydney
|
Posted: Sat Jul 11, 2015 10:57 am Post subject: |
|
|
Eddie,
I chose a random text file I had in the directory I was using for the test.
I am surprised by what I found and how easy it is to read text with read(13,*) text_array, as it separates each word as required.
It places each text, separated by a space in a separate variable.
One thing I didn't know is that you can terminate the reading the array of text with a \; the remaining variables are not read.
If you don't, it will read multiple lines until it has all 9 (in the case above)
I have forgotten if comma "," is also a separator.
The easiest way is to echo what is read.
I used a normal text file and did not get any error 59, so not sure of that is from.
My test looked to be working ok; just needs a bit of a clean up
John |
|
Back to top |
|
|
rogerh
Joined: 02 Nov 2014 Posts: 46 Location: Longmont, CO
|
Posted: Sat Jul 11, 2015 2:36 pm Post subject: |
|
|
Litus, John;
Here's the first few lines of the input file. It's a series of these groups
The first two lines are blank as is the 4th line. The 5th line is the column header. There are 20 data lines and then it starts over.
Roger
Signal Strength and Detection Date (UTC) 7 2015/06/04
Pa Pd D# Earthquake UTC Date Lat Lon Depth Mag
93 100 3 1983/12/22 04:11:30 12N 14W 8 6.3
82 88 1 1992/06/28 11:57:38 34N 117W 11 7.3
81 87 1 2007/06/02 21:34:58 23N 101E 10 6.1
81 87 3 2002/03/03 12:08:06 36N 70E 194 7.2 |
|
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
|