Jump to content
  • Advertisement
Sign in to follow this  
mmac

FORTRAN program

This topic is 2947 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to write a program that will open a file, read the numbers, then format them in a new file.. When i compile it everything goes through fine besides my do statement.. for some reason my computer at home doesn't let me do a 'Do until' do statement and i don't know why.
just the do look of my code is as follows:
Do
read(unit=20,fmt=99,end=11) time,height
write(21,100) time,height
end do

the compiler says:
error on line 17: unclassifiable statement (starts "do")
error on line 18: unclassifiable statement (starts "")
error on line 19: missplaced ENDDO

The 'Do' line is line 17.

This exact do loop works on the computer at my university, but not at home.. I'm using Nedit and gnome terminal, on Ubuntu.

thanks for any help

Share this post


Link to post
Share on other sites
Advertisement
The code you posted is not valid Fortran77, which is probably the issue. Later versions of Fortran introduced different loop types, so that would be my guess as to why you get different results on another compiler.

Share this post


Link to post
Share on other sites
So am i unable to do a DO until do loop, or does it need to be a count controlled one?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!