CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2000
    Posts
    10

    Converting C code to Fortran

    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 [email protected].

    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] );
    }



  2. #2
    Join Date
    Dec 1999
    Location
    Dublin, Ireland
    Posts
    1,173

    Re: Converting C code to Fortran

    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
    '--8<-----------------------------------------
    NEW -The printer usage monitoring application
    '--8<------------------------------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured