Re: Proper way to return a string
- From: Walter Spector <w6ws_xthisoutx@xxxxxxxxxxxxx>
- Date: Sat, 30 Dec 2006 21:38:14 GMT
"Steven G. Kargl" wrote:
...> function str_junk (a)
1
Warning: CHARACTER(*) function 'str_junk' at (1) is obsolescent in fortran 95
Is there some other warning you want?
The 'obsolescent' message is a good catchall. But in the situations that
we are discussing, something stronger should be issued. There are really
two cases here:
* When the function appears as a CONTAINed procedure - either as an internal
procedure, or as a module procedure,
* When the function is described in an INTERFACE block.
In the first case(s) the IRIX compiler message is:
f90-367 f90: ERROR STR_FUNC, File = bel1.f90, Line = 16, Column = 21
Object "STR_FUNC" is a module procedure or an internal function so it must
not be typed as an assumed-length character.
In the INTERFACE case, the IRIX compiler message is:
f90-1566 f90: WARNING STR_JUNK, File = bel2.f90, Line = 7, Column = 21
Assumed length character function "STR_JUNK" cannot be invoked. There is no
way to match caller/callee characteristics.
Walt
.
- References:
- Proper way to return a string
- From: Jeremy
- Re: Proper way to return a string
- From: Steven G. Kargl
- Re: Proper way to return a string
- From: Gordon Sande
- Re: Proper way to return a string
- From: Ron Shepard
- Re: Proper way to return a string
- From: Beliavsky
- Re: Proper way to return a string
- From: Richard Maine
- Re: Proper way to return a string
- From: Walter Spector
- Re: Proper way to return a string
- From: Steven G. Kargl
- Proper way to return a string
- Prev by Date: Re: allocation error
- Next by Date: Re: allocation error
- Previous by thread: Re: Proper way to return a string
- Next by thread: Re: Proper way to return a string
- Index(es):
Relevant Pages
|
|