How to compare two strings in 77?
- From: jane.sync@xxxxxxxxx
- Date: 29 Jan 2006 15:58:39 -0800
I thought I could test two strings with the code below, but it doesn't
work. I'm passing a string into the function below, but the result is
always 'not equal'. How are strings compared in Fortran 77? Thanks.
function evaluateinput(str1) result(string)
implicit none
character(12) str1
character(12) string
if (str1 .EQ. 'test') then
string = 'equal'
else
string = 'not equal'
endif
return
end
.
- Follow-Ups:
- Re: How to compare two strings?
- From: robin
- Re: How to compare two strings in 77?
- From: David Flower
- Re: How to compare two strings in 77?
- From: jane . sync
- Re: How to compare two strings?
- Prev by Date: Re: warning #266: function declared implicitly
- Next by Date: Re: How to compare two strings in 77?
- Previous by thread: warning #266: function declared implicitly
- Next by thread: Re: How to compare two strings in 77?
- Index(es):
Relevant Pages
|
|