Re: Fortranspeak & Javaspeak



A lot of these terms do not have an equivalent in Fortran because the
concepts do not exist. If you work in F95, some of the concepts do
exist. What you need is an interface between the two - have a look at
JAPI (http://www.japi.de/)

logical = bool
real = float
double precision = double
integer *2 = short
integer*4 = int
integer*8 = long
character = byte

You have to find out what the lengths are in Java. Note that chars in
Java are 'Unicoded'. They may be 16 or 32 bits. Characters in Fortran
are normally 8 bits so if you're passing character arrays, they have to
go through some sort of conversion, otherwise pass as a byte.

I don't know how big logicals are but in Java, they're supposed to be 1
bit.

.



Relevant Pages

  • Re: Comments from those devleoping niche software.
    ... I've written Fortran 95 programs ... > but very user-friendly analysis packages. ... > best of my knowledge as a bridge engineer) don't exist in any other ... Java would provide the business logic and front end. ...
    (comp.programming)
  • Re: gfortran diagnostics and so on
    ... TeX code, regular expression escapes, ... The default should be that a Fortran compiler compiles Fortran. ... The point, however, is that there are lots of uses for the backslash character that conflict with its C-language use as a magic "escape" character that changes the interpretation of following character. ...
    (comp.lang.fortran)
  • myF2J
    ... I came across an ad for a product myF2J that converts Fortran 77 to ... readable Java (there is also the free f2j that I think is analogous to ... I'd rather program in Fortran ... as a "single object pattern" language. ...
    (comp.lang.fortran)
  • Re: Is Fortran more accurate than Java ?
    ... Fortran is far more portable ... >> than Java since it doesn't specify a detailed arithmetic model. ... Portability has a variety of shadings. ... There are still plenty of machines for which it is a problem but they ...
    (comp.lang.java.programmer)
  • Re: seeking advice for "translate" Fortran code to Java code
    ... redefine a common block as needed for each subroutine. ... Still, Java has no pointers, so I ... Java arrays are always what C would call arrays of pointers ... Fortran intrinsics in Java appropriately. ...
    (comp.lang.fortran)