Take the 2-minute tour ×

I am trying to create a module for a fortran 90 program. The file is called epath.f90. When I try to create the file epath.mod by running an object-only compile on the file by way of the commad f95 -c epath.f90 it gives me the following error message:


MODULE euler-path
Error: Unclassifiable statement at (1)

END MODULE euler-path
Error: Expecting END PROGRAM statement at (1)
Error: Unexpected end of file in 'epath.f90'

The code for epath.f90 is:

MODULE euler-path

REAL, PARAMETER :: A=0.0, B=1.0, YSTART=0.0

END MODULE euler-path

I took the same steps for another module and it worked fine. Any help is appreciated.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

In Fortran, names - module names, variable names, etc - have to start with a letter and contain only letters, digits, or underscores. (Fortran in particular forbids using special characters like operators, eg, -/+/*/(/) in names because it's historically taken a very cavalier approach to the use of spaces, or for that matter explicitly defined variable names, which would make it very difficult to distinguish between a-b as a name and the expression a - b.) See, eg, section 3.2.2 ("Names") of the recent Fortran standard.

So euler_path is ok, euler_path123 is ok, but euler-path isn't.

share|improve this answer
That solved that problem. Thanks. –  Sprock Dec 5 '12 at 23:23
add comment

Your Answer


