Re: variable length strings
Date: Thu, 19 Aug 2004 00:28:26 GMT
Do you have an explicit interface?
Mr. Adam Burry wrote:
> I'm going blind reading the documentation shipped with Compaq Visual
> How does one normally pass strings around in Fortran? My readng
> suggests that they always have to be of known length. My compiler does
> not seem to like the following, for example:
> SUBROUTINE Set_Filename ( strFilename )
> CHARACTER(LEN=*) strFilename
> ! some code
> END SUBROUTINE
> But it is happy with: "CHARACTER(LEN=60)", for example. Is this like
> saying char in C? Isn't that evil?
> I'm coming from a C++ background.
posted from Netscape
- Re: Any suggestions?
... form of argument reference **MUST** have what is called an explicit interface. ... Interface blocks and modules are both Fortran 90 features. ... The C command line functionality has been around since C first got started, i.e., for over 20 years. ... Not all Fortran compilers support it yet as part of the Fortran compiler. ...
- Re: function returning an array
... this newsgroup is certainly not meant to teach the basics of Fortran; ... good documentation, it is quite *impolite* to abruptly jump into a ... I got somewhat upset when the poster asked, what an explicit interface might be. ... refusal to bother to look for basics. ...
- Re: present() not working ??
... | Fortran 90 is a standard, ... || But, the library routine always claims that the parameter IS present, ... | calling procedure, or there should be an interface block in the calling ... Lack of explicit interface IMO perfectly matches the symptoms: ...
- Re: Fortran/C interoperability
... I want to make a library built with Fortran to be callable from Fortran ... requirement for an explicit interface. ... Consider that the explicit interface provides a way for the compiler to ... end module mymod ...
- Re: INTERFACE problem
... of argument passing does not and *CANNOT* depend on whether or not there is an explicit interface. ... even when the Fortran standard says you need one. ... I don't see it mentioned, but those rules allowed passing arrays with different numbers of dimensions from the dummy, and passing an array element to an array dummy and referencing array elements starting at that element. ...