jane.sync@xxxxxxxxx wrote in message <1138579119.465314.236400@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>... >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?
This is Fortran 90 or later.
> function evaluateinput(str1) result(string)
> implicit none
> character(12) str1
character(len=*) :: str1
is required for a dummy argument that receives an argument
whose length can be anything.
> character(12) string
> if (str1 .EQ. 'test') then
Re: Variable length/precision formats? ... "&" is contunuation in Fortran anyway. ... purpose of string substitution.... Something more general purpose, although for general purpose use, I'd prefer it also support substitution of character strings (, not that it makes any sense for the numerical portion of a format, but you could use it to change from say I format to Z format (and in a wide variety of other places as well). ... (comp.lang.fortran)
Re: ATTRIBUTES problem ... personally use Compaq Fortran and Microsoft C++. ... The string length is a big issue. ... and the Fortran code may well not do what you ... > fortran compiler for windows I'm trying to get acquainted with how strings ... (comp.lang.fortran)
Re: Fortran-compiled DLLs in Python ... WindowsError: exception: access violation... > I do not know how fortran passes this parameter, ...strings may pass a "string descriptor", ... (comp.lang.python)
Re: Fortran/C string interop? ...fixed-length Fortran strings could be passed using the same approach as Fortran arrays. ... That would require passing a Fortran string as a single descriptor argument instead of the traditional hidden length argument. ... The idea seems quite comparable to the ability to pass native Fortran arrays, but probably was just not considered because text handling is such a low priority in Fortran. ... (comp.lang.fortran)
Re: ATTRIBUTES problem ... >!dec$ attributes reference:: mystring... but there are A LOT of issues with mixing Fortran and> C/C++ ... > The string length is a big issue. ... > subroutine test ... (comp.lang.fortran)