constant string passing as dummy argument

constant string passing as dummy argument

Dear all,

A fortran90 subroutine, with an argument which is character
array type, accepts a constant string as its dummy argument.
The real argument is declared as:

character, dimention(*) :: s

The constant string looks like

'I am a string...'

But the compiler reports:

"This subroutine has the wrong
number of arguments or arguments with the wrong name, type
or rank"

What is the problem with this?

Please reply to yxie@doc.ic.ac.uk as well.

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

What you have declared is an array of one-byte character strings. What you evidently wanted instead was:

character(len=*) :: s

Steve

Steve - Intel Developer Support

Leave a Comment

Please sign in to add a comment. Not a member? Join today