hart@UV4.EGLIN.AF.MIL (10/19/89)
E G L I N A F B
I N T E R O F F I C E M E M O R A N D U M
Date: 19-Oct-1989 07:38am CDT
From: DENNIS L HART
HART
Dept:
Tel No: 904-882-3154
TO: _WINS% ( _DDN[XPERT@EXPO.LCS.MIT.EDU] )
Subject: Fortran and C
I have written a couple of messages inquiring about users who are
implementing DECwindow application programs using VMS and Fortran. I
have received almost zero response and I can understand given X Windows
is originally C based, and I understand that C is the "standard" language
being applied to writing windowed interfaces (at least X Window based). I
cannot argue with why C may be better suited to this purpose; however, I
am working in an exclusively Fortran environment and I do not have access
to a C compiler running under VMS version 5+ (at this time). I would like
to write windowing software using C but I need to be made aware of any
problems that might exist when reading/writing data files that would be
accessed by both Fortran and C application packages. I want to become more
informed on this matter so I can determine whether or not I can make a case
of developing future windowing software in C.
P.S. I am still interested in others who are using DECwindows Toolkit
and/or Xlib routines under VMS via Fortran. I would like to know
who out there is developing similar applications.
Dennis L. Hart
Atlantic Research Corporation
Directorate of Computer Sciences
Eglin AFB, Florida 32542
904-882-3154 or Autovon 872-3154hildum@ntmtv.UUCP (Eric Hildum) (11/01/89)
Assuming that DECwindows follows the procedure calling standard (check your manuals to learn about this), you should have no problems calling X window functions from FORTRAN. Just check your FORTRAN Users Guide and the DECwindows manuals about procedure calling. As far as reading/writing files in C and FORTRAN, it depends on how fancy you wish to get and what sort of capabilities you need. RMS supplies a number of different file formats and manipulation functions (eg, keyed access, etc.), and can be used from either language quite easily. If you wish to stick with language builtins, then FORTRAN has a more flexiable system. Strickly speaking, C does not have builtin I/O capability. The standard I/O library functions do call RMS however, so can handle all VMS file formats if need be. Remember, the basic standard C file structure is a stream of bytes, you have to build everything on top of that if you are doing C only file and record manipulation. Eric