Re: warning #266: function declared implicitly



<emammendes@xxxxxxxxx> wrote in message
news:1138569826.356730.140980@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

> Fortran:

> subroutine calnpr(nsuby,nsubu,ny,nu,ne,L,nall)
> integer nyu,nyue,ia,i,j
> integer ny(nsuby,nsuby),nu(nsuby,nsubu),ne(nsuby,nsuby)
> integer L(nsuby), nall(nsuby)

> C:

> calnpr_(&nsuby,&nsubu,ny,nu,ne,degree,nall);

I would have given the C compiler a prototype like:

/* File: my_Fortran_stuff.h */

#ifndef _MY_FORTRAN_STUFF_
#define _MY_FORTRAN_STUFF_

void calnpr_(int* nsuby, int* nsubu, int* ny, int* nu, int* ne,
int* L, int* nall);

#endif
/* End of file: my_Fortran_stuff.h */

And then somewhere near the top of your C file you could have
a line such as:

#include "my_Fortran_stuff.h"

--
write(*,*) transfer((/17.392111325966148d0,6.5794487871554595D-85, &
6.0134700243160014d-154/),(/'x'/)); end


.



Relevant Pages

  • Re: allocation error
    ... Though in the Java and Fortran case, ... Programming Language. ... communicate with the same computer that has a compiler. ...
    (comp.lang.fortran)
  • [RFC][PATCH-2.6] Clean up and merge compiler-*.h
    ... the kernel headers in include/linux to include/linux-abi. ... * Common definitions for all gcc versions go here. ... -/* Some compiler specific definitions are overwritten here ...
    (Linux-Kernel)
  • Re: A question on Newtons Method
    ... >> I can't believe you'd advise a noob to use a compiler which is still ... > production codes and codes from textbooks. ... > The Fortran standard generally does not specify the required behavior ... >> another important class of hassle which most numerical programmers ...
    (sci.math.num-analysis)
  • Fortran Resources (June)
    ... and the standard for the Fortran language and its derivatives. ... WHERE CAN I OBTAIN A FORTRAN 95 COMPILER? ... Absoft Fortran compilers, debuggers, and development tools for Windows, ... are available for Linux systems. ...
    (comp.lang.fortran)
  • Fortran Resources (July 2004)
    ... and the standard for the Fortran language and its derivatives. ... WHERE CAN I OBTAIN A FORTRAN 95 COMPILER? ... Absoft Fortran compilers, debuggers, and development tools for Windows, ... are available for Linux systems. ...
    (comp.lang.fortran)