[comp.lang.c] Fortran graphics

rajohn@hubcap.UUCP (r alan johnson) (02/07/89)

This may be a stupid question, but since the Microsoft FORTRAN 4.1
compiler tells me that it is possible to link Microsoft C object files,
is is just as possible to link Turbo C 1.5 object files? I want the Turbo C
graphics in my fortran code, but I can't seem to figure this one out.
The docs. aren't very much help, either in Microsoft's or Borland's case
on this one. (Or am I reading the wrong pages?) An object file is an
object file isn't it? (at least in this case?) Any help will be appreciated!

		Thanks,
		R. Alan Johnson (rajohn@hubcap.clemson.edu)

BVAUGHAN@pucc.Princeton.EDU (Barbara Vaughan) (02/08/89)

In article <4328@hubcap.UUCP>, rajohn@hubcap.UUCP (r alan johnson) writes:

>This may be a stupid question, but since the Microsoft FORTRAN 4.1
>compiler tells me that it is possible to link Microsoft C object files,
>is it just as possible to link Turbo C 1.5 object files? ...An object
>file is an object file, isn't it?
>
No, unfortunately not.  You can't even link together two Fortran routines
compiled with different compilers.  In the cases, such as you mention,
where routines from one language can be combined with those from
another, compatiblity of instructions, word length, I/O handling, and
many other things that normally wouldn't be compatible has been estab-
lished. Even then, one must proceed with great caution.  A quote from
my Lahey Fortran F77L manual, advising programmers who wish to link
Lahey Fortran routines with Lattice C routines, will give you an idea
of the complications: "Since Fortran stores multidimensional arrays
in column-major order, while C stores arrays in row-major order, it
is usually not convenient to pass multidimensional arrays... (if you
do)...an n-dimensional array A that is declared: A(i1,i2,...in) ...
must be accessed with subcripts reversed in C...: A(in,in-1...i1).
Also, the first element of a C array dimension is 0, so Fortran
arrays should be dimensioned (0:n-1) for an array of size n. "
   I have been looking for a library of Fortran-callable graphics
routines (see my previous posting) and so far have heard of one,
although I haven't seen it yet. It is called NO LIMIT by M.E.F
Environmental, Limited of Austin, Texas. It provides "graphics,
screen control, communications, character/string manipulation,", etc.
The graphics it supports include the basic DRAW functions, GET, PUT,
PAINT, ROTATE and various others. Microsoft is one of the four
Fortran compilers they claim compatibility with.
For those who are primarily interested in text screen control
(scrolling, windows, etc.) along with cursor control and keyboard
control, the Spindrift Library from Spindrift Laboratories, Arling-
ton Heights, IL is quite useful. It is available for F77L (Lahey)
and Microsoft Fortran. I have used it to create user-interface
menus in my Fortran programs.

Barbara Vaughan

mfryba@phoenix.Princeton.EDU (Martin Francis Ryba) (02/08/89)

In article <7104@pucc.Princeton.EDU> BVAUGHAN@pucc.Princeton.EDU writes:
>   I have been looking for a library of Fortran-callable graphics
>routines (see my previous posting) and so far have heard of one,
>although I haven't seen it yet. It is called NO LIMIT by M.E.F
>Barbara Vaughan


   We have been using the EGA Toolkit by Connell Scientific Graphics
with Lahey Fortran on various 286's and 386's with fine results.  They
claim their stuff can be compatible with *any* language or installed as
a separate driver (or something like that).  Essentially the toolkit is
a bunch of routines written in assembly code.  We also have some custom
routines that use the Lahey interrupt to do simple things like cursor
position and string output.

Marty Ryba (slave physics grad student)
They don't care if I exist, let alone what my opinions are!
marty@puppsr.princeton.edu
Marty Ryba (slave physics grad student)
They don't care if I exist, let alone what my opinions are!

kaufman@maxzilla.Encore.COM (Lar Kaufman) (02/10/89)

In article <4328@hubcap.UUCP> rajohn@hubcap.UUCP (r alan johnson) writes:
>This may be a stupid question, but since the Microsoft FORTRAN 4.1
>compiler tells me that it is possible to link Microsoft C object files,
>is is just as possible to link Turbo C 1.5 object files? I want the Turbo C
>graphics in my fortran code, but I can't seem to figure this one out.
>The docs. aren't very much help, either in Microsoft's or Borland's case
>on this one. (Or am I reading the wrong pages?) An object file is an
>object file isn't it? (at least in this case?) Any help will be appreciated!
                                                                            
                                                                         
                                                                           
                                                                        
Your best bet to marry Microsoft Fortran with Turbo C is probably a 
third-party product designed for the purpose. I suggest Phoenix
Technologies' PLink-86 (or whatever is most current). Phoenix is
located in Norwood, MA. Sorry, I don't have a phone number for them. 

 -lar

                 Secular Animism, a value system for our times.
 
 Lar Kaufman <= my opinions                  kaufman@Encore.com
 Fidonet: 1:322/470@508-534-1842 (Green Dog of MassNet Central)

murphy@pur-phy (William J. Murphy) (02/13/89)

In article <7104@pucc.Princeton.EDU> BVAUGHAN@pucc.Princeton.EDU writes:
>In article <4328@hubcap.UUCP>, rajohn@hubcap.UUCP (r alan johnson) writes:
>
>>This may be a stupid question, but since the Microsoft FORTRAN 4.1
>>compiler tells me that it is possible to link Microsoft C object files,
>>is it just as possible to link Turbo C 1.5 object files? ...An object
>>file is an object file, isn't it?
>>
>   I have been looking for a library of Fortran-callable graphics
>routines (see my previous posting) and so far have heard of one,
>although I haven't seen it yet. It is called NO LIMIT by M.E.F
>Environmental, Limited of Austin, Texas. It provides "graphics,
I know of another library for Fortran graphics on the PC, it is a product
called GRAFMATIC.  A person I work with somehow got hold of the library
of object routines, so I viewed the object code to see what is was. 
There seemed to be support for creating plots for publication.  I doubt
that I would use it since there are no docs with it. (yes it is pirated)
and second, I would not use it since it is pirated.  If you want a price,
Programmer's Connection carried this product, so look in a Byte, or Computer
Shopper to find their number.

Bill Murphy