C calls FORTRAN subroutine
Greg "Bucket" Woods
woods at hao.UUCP
Sat Oct 13 07:11:39 AEST 1984
> In the C program, I have
> ----------
> #include <stdio.h>
>
> main()
> {
> try_()
> }
> ----------
>
> In the Fortran program, I have
> ----------
> subroutine try
> write (6,100)
> 100 format ("subprogram")
> end
> ----------
>
This is a weird one. I know why it doesn't work, but knowing why isn't much
help. I put an "fflush(stdout)" call in the main program after the call to
"try", and then ran "adb" on this program, putting a breakpoint in "write".
The result of that shows that it is trying to write the string "subprogram"
on file descriptor 3. How about it, compiler wizards? What the '&"#%@*! is
going on?
--Greg
--
{ucbvax!hplabs | allegra!nbires | decvax!stcvax | harpo!seismo | ihnp4!stcvax}
!hao!woods
"...the bus came by, and I got on, that's when it all began..."
More information about the Comp.unix
mailing list