hydraulic_M.H.
06-17-2004, 10:42 AM
Hi,
I have problem using Module, I have written a module and the corresponding file name.
the module looks like follow
module chartest
contains
function abc(n)
implicit none
INTEGER , INTENT (IN) :: n ! length of thestring to return
CHARACTER (LEN = n) abc ! returned string
CHARACTER (LEN = 15) :: alpha = 'abcdefghijklmno'
abc = alpha(1:n)
end function abc
end module
and the main program looks llike follow:
program test_abc
USE chartest
implicit none
INTEGER :: n
write (*,*) 'inter int: '
read (*,*) n
write (*,*) ' it is ', abc(n)
end program
but whenever I compile the main program the foollowing error appears:
'1370-S: " mainabc", line 5: module chartest is not available. '
I don't know how to compile the main program that recognizes the module.
thanks
M.H. :confused:
I have problem using Module, I have written a module and the corresponding file name.
the module looks like follow
module chartest
contains
function abc(n)
implicit none
INTEGER , INTENT (IN) :: n ! length of thestring to return
CHARACTER (LEN = n) abc ! returned string
CHARACTER (LEN = 15) :: alpha = 'abcdefghijklmno'
abc = alpha(1:n)
end function abc
end module
and the main program looks llike follow:
program test_abc
USE chartest
implicit none
INTEGER :: n
write (*,*) 'inter int: '
read (*,*) n
write (*,*) ' it is ', abc(n)
end program
but whenever I compile the main program the foollowing error appears:
'1370-S: " mainabc", line 5: module chartest is not available. '
I don't know how to compile the main program that recognizes the module.
thanks
M.H. :confused: