Click to See Complete Forum and Search --> : Converting C code to Fortran


pavan_jp
June 27th, 2001, 06:12 AM
I have got a sample C code something like this. Please
let me know how to convert this C code into Fortran.
Reply me back at pavan_jp@yahoo.com.

Thanks in advance.
Pavan
------------------------------------------------------
#define X 0
#define Y 1
#define Z 2

typedef struct tVertexStructure tsVertex;
typedef tsVertex *tVertex;

typedef struct tEdgeStructure tsEdge;
typedef tsEdge *tEdge;

typedef struct tFaceStructure tsFace;
typedef tsFace *tFace;

struct tVertexStructure {
int v[3];
int vnum;
tEdge duplicate;
tVertex next, prev;
};

struct tEdgeStructure {
tFace adjface[2];
tVertex endpts[2];
tFace newface;
tEdge next, prev;
};

struct tFaceStructure {
tEdge edge[3];
tVertex vertex[3];
tFace next, prev;
};


int Normz( tFace f )
{
tVertex a, b, c;

a = f->vertex[0];
b = f->vertex[1];
c = f->vertex[2];


return
( b->v[X] - a->v[X] ) * ( c->v[Y] - a->v[Y] ) -
( b->v[Y] - a->v[Y] ) * ( c->v[X] - a->v[X] );
}

Clearcode
June 27th, 2001, 06:33 AM
It is very unlikely that you will get an answer to that question here - this is a Visual Basic forum.

You could try the Visual C++ forum on this site or seek out a Fortran newsgroup.

HTH,
D.

-------------------------------------------------
Ex. Datis: Duncan Jones
Merrion Computing Ltd
http://www.merrioncomputing.com