Re: Implementing JAVA interfaces in FORTRAN 20xx



fj <francois.jacq@xxxxxxx> wrote:

You might try to solve the problem with an equivalence :

TYPE :: integer_type
SEQUENCE
INTEGER :: value
END TYPE

integer :: vector(10)
type(integer_type) :: other(10)
equivalence (vector,other)

!.. you fulfill vector

CALL wonder_routine(other)

I've not quite figured out what the purpose behind this all was supposed
to be anyway, but note that as soon as you make a derived type a
sequence type, it is not extensible. This might defat the whole point,
if I've correctly guessed the objective (which I might not have).

This is, of course, in addition to the mant, many other "issues" with
equivalence.

--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain
.