@@ -2,7 +2,7 @@ module fpm_cmd_new
2
2
3
3
use fpm_command_line, only : fpm_new_settings
4
4
use fpm_environment, only : run, OS_LINUX, OS_MACOS, OS_WINDOWS
5
- use fpm_filesystem, only : join_path, exists, basename, mkdir, is_dir
5
+ use fpm_filesystem, only : join_path, exists, basename, mkdir, is_dir, to_fortran_name
6
6
use ,intrinsic :: iso_fortran_env, only : stderr= >error_unit
7
7
implicit none
8
8
private
@@ -70,7 +70,7 @@ subroutine cmd_new(settings)
70
70
&' ' ]
71
71
! create placeholder module src/bname.f90
72
72
littlefile= [character (len= 80 ) :: &
73
- &' module ' // bname, &
73
+ &' module ' // to_fortran_name( bname), &
74
74
&' implicit none' , &
75
75
&' private' , &
76
76
&' ' , &
@@ -79,7 +79,7 @@ subroutine cmd_new(settings)
79
79
&' subroutine say_hello' , &
80
80
&' print *, "Hello, ' // bname// ' !"' , &
81
81
&' end subroutine say_hello' , &
82
- &' end module ' // bname]
82
+ &' end module ' // to_fortran_name( bname) ]
83
83
! create NAME/src/NAME.f90
84
84
call warnwrite(join_path(settings% name, ' src' , bname// ' .f90' ),&
85
85
& littlefile)
@@ -121,7 +121,7 @@ subroutine cmd_new(settings)
121
121
if (exists(bname// ' /src/' ))then
122
122
littlefile= [character (len= 80 ) :: &
123
123
&' program main' , &
124
- &' use ' // bname// ' , only: say_hello' , &
124
+ &' use ' // to_fortran_name( bname) // ' , only: say_hello' , &
125
125
&' implicit none' , &
126
126
&' ' , &
127
127
&' call say_hello()' , &
0 commit comments