Re: How to detect NULL input?
- From: jane.sync@xxxxxxxxx
- Date: 29 Jan 2006 19:53:54 -0800
That worked for the string comparison with everything except NULL.
Maybe I goofed something up in the main. The whole program is below.
Did I goof something up?
program test
implicit none
CHARACTER(12) fname
CHARACTER(12) evaluateinput
C CHARACTER(*) fname
C CHARACTER(*) evaluateinput
100 WRITE (*, 101)
101 format ('String: ', $ )
READ (*, *) fname
print *, 'Test ',evaluateinput(fname)
END program
function evaluateinput(str1) result(string)
implicit none
character(*) str1
character(*) string
string = 'world'
if (str1 .EQ. '') then
string = 'equal'
else
string = 'not equal'
end if
return
end
.
- Follow-Ups:
- Re: How to detect NULL input?
- From: robin
- Re: How to detect NULL input?
- From: Catherine Rees Lay
- Re: How to detect NULL input?
- References:
- How to detect NULL input?
- From: jane . sync
- Re: How to detect NULL input?
- From: Rich Townsend
- How to detect NULL input?
- Prev by Date: Re: How to compare two strings in 77?
- Next by Date: MATMUL slower than expected
- Previous by thread: Re: How to detect NULL input?
- Next by thread: Re: How to detect NULL input?
- Index(es):
Relevant Pages
|
|