Solved FORTRAN error, invalid in context

November 18, 2011 at 08:01:42
Specs: Windows XP
Hi,
I'm completely new to FORTRAN, and I've come along something I just can't figure out (log):
main.f: In program `main':
main.f:14: 
         DO 17 N = 0, 10
         1
main.f:21: (continued):
         END
         2
Statement at (2) invalid in context established by statement at (1)
main.f:14: 
         DO 17 N = 0, 10
         ^
End of source file before end of block started at (^)
make[2]: *** [build/Debug/MinGW-Windows/main.o] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2

It's saying that there is a statement a line after my END command, that doesn't work in context with my DO loop. There are no spaces or line breaks after the END. I can post the code as well if needed.
Sorry if this is really simple and I'm wasting your time.

Ενγλιση λανγυαγε,
Γρεεκ λεττερς.


See More: FORTRAN error, invalid in context

Report •

#1
November 18, 2011 at 08:11:18
✔ Best Answer
Have you defined the label "17" anywhere? It might be clearer if you listed the whole program rather than a couple of fragments.

Report •

#2
November 18, 2011 at 08:19:11
Defined the label..?

*facepalm*

Okay, that works. I'd thought it was like BASIC, where the lines were automatically numbered. Thanks!

Ενγλιση λανγυαγε,
Γρεεκ λεττερς.


Report •
Related Solutions


Ask Question