replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - compilation error!
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 

compilation error!

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



Joined: 22 Dec 2011
Posts: 8

PostPosted: Mon Apr 23, 2012 6:17 pm    Post subject: compilation error! Reply with quote

! program to generate course grade report
implicit none
real:: MTH112(10), MTH110(10), MTH123(10), MTH125(10), PHY111(10), PHY113(10), PHY124(10)
integer:: counter
character*(10):: pcs10046
open(unit=5, file='in_data.txt', status='old')
open(unit=6, file='out_data.txt', status='new')
write(6,200)
do counter=1,10
read(5,100)MTH112,MTH110,MTH123,MTH125,PHY111,PHY113,PHY124
enddo
if(counter>=70)then
print*, 'A'
elseif(counter>=60.AND.counter<=69)then
print*, 'B'
elseif(counter>=50.AND.counter<=59)then
print*, 'C'
elseif(counter>=45.AND.counter<=49)then
print*, 'D'
elseif(counter>=40.AND.counter<=44)then
print*, 'E'
else(counter>=0.AND.counter<=39)then
print*, 'F'
endif
100 format(7(f6.2,2x))
200 format(//,24x, 'students result file', /,24x,'..............................',//,5x, 'psc10046',i2, 2x, &
'MTH112', 2x, 'MTH110', 2x, 'MTH123', 2x, 'MTH125', 2x, 'PHY111', 2x, 'PHY113', 2x, 'PHY124',/)

end


pls guys do help, having compilation error running the program above. it displays the error below;

C:\project2\result report.F95(22) : error 607 - Extraneous character '(' following construct label
Compilation failed.

tried all i know how to do but still the error. thanks
Back to top
View user's profile Send private message
brucebowler
Guest





PostPosted: Mon Apr 23, 2012 8:23 pm    Post subject: Reply with quote

I think you'd be better of asking your professor for help.
Back to top
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8210
Location: Salford, UK

PostPosted: Mon Apr 23, 2012 8:40 pm    Post subject: Reply with quote

You cannot have an open bracket after "else" on line 22.
May be you want "else if"
Back to top
View user's profile Send private message AIM Address
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