Re: How to compare two strings in 77?



I think I got it. Does the following code look like something a Fortran
programmer would use to test two strings?

function evaluateinput(str1) result(string)
implicit none
character(12) str1
character(12) string
if (LLT(str1,'test')) then
string = 'less than'
else if (LGT(str1,'test')) then
string = 'greater than'
else
string = 'equal'
end if
return
end

.



Relevant Pages

  • Re: Help from fellow Fortran Users
    ... >> who already know Fortran. ... > that your proficient programmer would take for granted in any language ... doing something sane like null-terminated strings. ... Not to be confused with the Chocolate, Chocolate, Chocolate, and Double Chocolate flavour. ...
    (comp.lang.fortran)
  • Brian Kernighan, maybe Im not worthy, maybe Im scum
    ... It's a critique of the "Beautiful" code authored by ... Rob Pike and discussed by Brian Kernighan in a new O'Reilly book. ... programmer, right? ... strings, only for what we call in .Net, sbyte, strings o' bytes. ...
    (comp.programming)
  • Re: A note on personal corruption as a result of using C
    ... Why did you feel the need to handle NULs in strings? ... A bad programmer can recreate Fortran in any language. ... It troubled mathematicians that the square root of minus one seemed to ...
    (comp.programming)
  • Re: PL/I string representations
    ... Mr Nilges is talking through his nose again. ... > machines that use ASCII. ... He liked large strings last year, ... example of a non-promotable programmer who's unfit for any role above ...
    (comp.programming)
  • Re: security enhacement to C runtime library (XXX_s)
    ... In the below link MS announces a security update to the C runtime ... Every buffer overflow error that was made before can still be ... strings in C the way they are used in every other programming ... how can we increase the programmer ...
    (comp.std.c)