Is 'vegas.f' on your computer?
Is 'vegas.f' in the same directory as the source file you are trying to compile?
Have you tried compiling your program with the full path of 'vegas.f' added to the INCLUDE directive?

Well, we really can't provide any more detailed suggestions unless you furnish your Fortran code and the error messages. If the compiler isn't reading 'vegas.f', how are you getting specific syntax errors generated by your compiler.

Fortran 77 is supposed to be a subset of Fortran 95, in order to provide compatibility with older code.

Full path means instead of just 'vegas.f' you supply something like 'c:\subdirectory\subdirectory\vegas.f' so that the compiler can trace the location of 'vegas.f' from the root volume to the directory where the file is stored.

Staff: Mentor

The include statement just puts the contents of the file vegas.f inside the file vegastest.f95 when compiling. As the latter is in free form, while the fortran 77 file is formatted (comment indicated by C in the first column, 1st-5th columns for labels, 6th column for continuation of the previous line, statements in columns 7-80), it is normal that the compiler complains.

You shouldn't include the code, but compile it seperately and link the object file. For example:

gfortran -c vegas.f

gfortran vegastest.f95 vegas.o

Most modern compilers usually assume by default that a file with extension .f is column-formatted, but some compilers can require a flag be set to explicitely indicate that a file is formatted.

DrClaude, thank you so much for helping! That worked! The only thing is that now when I try to run the program (./vegastest), it says "-bash: ./vegastest: No such file or directory". Is there a different way I have to run the program?