-
Notifications
You must be signed in to change notification settings - Fork 112
Description
While attempting to use FPM for the first time, I figured out that it does not recognize a use statement if you place a tab before the use statement. This can be quite confusing if you are used to using a compiler that allows you to use tabs (such as gfortran.) This is also the case for include statements.
program main
use helloff
end program main
Will compile fine (if fpm.toml is correct) while
program main
use helloff
end program main
will give you
Fatal Error: Cannot open module file ‘helloff.mod’ for reading at (1): No such file or directory compilation terminated.
no matter what you specify in fpm.toml.
This is because adjustl is used when testing for use statements, which removes spaces, but ignores tabs. (FPM also uses adjustl while testing for both use and include statements instead of right after reading the lines from the file, making the adjustl run many more times than required, so it might be a good idea to change the way it deals with indentation even if tabs don't get supported)