Re: defining an arbitrary type in your newer Fortrans



PJH wrote:

Thanks for this Walter

You are welcome.

I seem to remember either Microsoft PowerStation or DEC Fortran had a
(non-F90) user defined type that used the dot notation - I think it was
called a STRUCTURE or maybe a RECORD (my memory of the details is somewhat
hazy).

VAX Structures. DEC intentionally implemented something that was entirely
incompatible with the direction the Fortran Standards were heading. Then a
number of other vendors had to incorporate "VAX compatibility" into their
compilers - spreading the disease.

Possibly it was the overloaded operator in F90 that caused problems?

VAX structures did not support operator overloading, so it didn't cause as
big a mess. But with F90 operator overloading, it would have been a huge
mess.

Note that C does not have operator overloading. And while C++ does have some
operator overloading capabilities, it does not have Fortrans general ability
to create operators with names - like .mydotproduct. or .pauls_divide. or
..daves_vowel_reducer. and the like.

Still, no point in complaining as it certainly isn't going to change just
for me.

Water under the bridge.

But take heart. Someday we'll have Fortran 2003 type-bound procedures,
and also inheritance. Which should mitigate the issue to some extent for
codes that adopt a more OO style.

W.
.



Relevant Pages

  • Re: Boost process and C
    ... languages, from fortran to visual basic... ... Operator overloading is a well known technique, ... overloading, which is a complexity C can do without, but other languages ...
    (comp.lang.c)
  • Re: Boost process and C
    ... languages, from fortran to visual basic... ... Operator overloading is a well known technique, ... There is no overloading possible for higher dimensional arrays ...
    (comp.lang.c)
  • Re: Criticisms?
    ... operator overloading. ... I don't think that Fortran or Visual Basic has C-like syntax, ... "The lusers I know are so clueless, that if they were dipped in clue ...
    (comp.lang.c)
  • Re: Lisp Book(s) in the K&R Style
    ... >> Fortran 90 has user-defined types with public and private members and ... >> operator overloading and thus provides some support for OOP. ...
    (comp.lang.lisp)