 |
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
Speculater
Joined: 16 Jan 2012 Posts: 1
|
Posted: Mon Jan 16, 2012 10:37 pm Post subject: Fortran is not compiling the source due to one line. |
|
|
909 FORMAT(i3,2x,<nvmax>(<nvmax>i1,2x),2x,i4)
Is returning the error:
../gensc.f90:289.18: Error: Unexpected element '<' in format string at (1)
I suspected that <nvmax> was asking for me to set the value, and when I tried inputting the value as an integer it still produced the same error. I appreciate any help provided! |
|
Back to top |
|
 |
brucebowler Guest
|
Posted: Tue Jan 17, 2012 3:41 pm Post subject: |
|
|
That looks like an extension to the fortran standard I remember from my VMS days. you need to replace <nvmax> (including the < and >) with a number. |
|
Back to top |
|
 |
IanLambley
Joined: 17 Dec 2006 Posts: 506 Location: Sunderland
|
Posted: Tue Jan 17, 2012 6:07 pm Post subject: |
|
|
Good old VAX/VMS eh?
Try something like this:
Code: |
character*80 format_string
integer*4 iarray(4)
nvmax = 4
open(unit=10,file='myoutput.txt',status='unknown')
!build a charachter variable containing the format
write(format_string,1000)nvmax,nvmax
1000 format('(i3,2x,' ,i2, '(' ,i2, 'i1,2x),2x,i4)' )
!use the format in the character string
write(10,format_string)1,(iarray(i),i=1,nvmax),2
close(unit=10)
|
We just need the "Q" format now, and the indexed files! |
|
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
|