replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Fortran is not compiling the source due to one line.
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 

Fortran is not compiling the source due to one line.

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



Joined: 16 Jan 2012
Posts: 1

PostPosted: Mon Jan 16, 2012 10:37 pm    Post subject: Fortran is not compiling the source due to one line. Reply with quote

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
View user's profile Send private message
brucebowler
Guest





PostPosted: Tue Jan 17, 2012 3:41 pm    Post subject: Reply with quote

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

PostPosted: Tue Jan 17, 2012 6:07 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
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