From: Eli Osherovich on
On Mar 9, 6:47 pm, "James Van Buskirk" <not_va...(a)comcast.net> wrote:
[snip]

James, it works. Thank you.

I have some questions about assumed-size vs assumed-shape arrays, but
I should probably ask them in a separate thread.

Thanks.


From: Dr Malcolm McLean on
On 9 Mar, 15:53, Eli Osherovich <eli.osherov...(a)gmail.com> wrote:
>
> May be I do not understand you correctly... but my impression is you
> are talking about C not Fortran.- Hide quoted text -
>
I got the wrong end of the stick. We have a lot of non-native English
speakers here who use terms like "wrapper" incorrectly. I assumed you
meant "interface" rather than Fortran wrapper.

In Fortran 77 an integer is passed along with a string to give its
length. So to call a C string functions it's

void cfunc_(char *str, int N)

note it's "int N", not "int * N"

The easiest way to return a string is simply to write to the buffer
you used to pass the input.

(A question for middlebies: should the C function use size_t
internally? What are the pros and cons of doign so?).
First  |  Prev  | 
Pages: 1 2
Prev: Flowchart software
Next: GUI: Fortran + Visual Basic