[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::digital_unix

Title:DIGITAL UNIX(FORMERLY KNOWN AS DEC OSF/1)
Notice:Welcome to the Digital UNIX Conference
Moderator:SMURF::DENHAM
Created:Thu Mar 16 1995
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:10068
Total number of notes:35879

9358.0. "DEC Fortran 90 for socket programming?" by HGOM11::HELENZHOU () Wed Apr 02 1997 06:13

    Hi,
    
    My customer want use DEC Fortran 90 for TCP/IP network programming.
    
    Could you tell me whether the SOCKET programing interface can be called
    from DEC Fortran 90 for TCP/IP network programming, instead of using
    DEC C ?
    
    I think the Socket System Calls/library calls can all be called from
    DEC Fortran 90 by including the proper library files and header files.
    But how about the DATA STRUCTURES? if they can also be defined in
    DEC Fortran 90's format? or have to use a DEC C routine to define the
    related data structures?
    
    Thanks & Reg.
    Helen
    
    
T.RTitleUserPersonal
Name
DateLines
9358.1Not impossible, but probably some work req'dSUBPAC::FARICELLIWed Apr 02 1997 15:0125
   I'm assuming this is under Unix, correct?

   The Digital Fortran compiler team (see TURRIS::FORTRAN) may have a
   definitive answer, but I think that any problems you might have
   will not be from the mechanics of calling the socket routines,
   but from translating the necessary header files from C to Fortran (90).

   I don't think it's impossible, just that the user will have to
   do the translation themselves. Most C data structures can be
   translated to Fortran via either the STRUCTURE/RECORD extension to
   f77, or the TYPE statements in f90. I don't think that f90 has the
   concept of "unsigned" -- this seems to be used in /usr/include/sys/socket.h
   But you might be able to fake it.

   Things like macro's defined in C code will be the most problematical.

   It is sometimes easier to write a thin layer of C code that
   presents a Fortran-like API to the library you wish to call.
   Usually the end user only needs a small subset of the entire API.

   Hope this helps. Ask if you need more assistance.

   -- John Faricelli

9358.2thanks a lot!BEJVC::HELENZHOUWed Apr 02 1997 21:358
    Hi, John
    
    Thank you very much for your timely help!  Yes, It's UNIX system.
    I now understanding more clear what's the major barries and the possible 
    way to resolve. I'll find more from FORTRAN NOTES is necessary.
    
    Reg.
    Helen