John Bray wrote:
> Any changes to the lengths of subroutine names impacts the
> object loading system on the machine, which is far
> outside the remit of Fortran 90. Much better not to
> interfere here.
This is not true at all. C++, for example, has no name length limits
whatsoever. Furthermore, it allows *native* function overloading, so
that it would *seem* that the loader would need to know an arbitrarily
long argument list as well as an arbitrarily long name.
In practice, neither is the case. C++ works just fine with many of the
limited-name-length UNIX (and other) loaders that Fortran currently
uses.
So how do they do it? All C++ implementations of which I am aware
encode the function names and argument lists of all C++ function calls
and definitions into a name small enough to fit into the loader.
Then all that is needed is for the loader, debugger and other such tools
to be able to *DECODE* the scheme so that they can printing error
messages and such.
This "name mangling" scheme could easily be made to work in Fortran if
we
add the small proviso that unlimited name length requires an explicit
interface, since the requirement of prototype declaration (cf. INTERFACE
block) for each function called is what makes the C++ scheme work.
"Name
mangling" may even work in Fortran without the proviso. After all, we
just want to encode the name, not the argument list, right?
-------- Cray Research --------+ Roger Glover
"Never tell a soldier how to | Instructor/Student:
do something. Just tell him | Fortran
to do it and let him amaze | Java
you with his ingenuity." | C++
-- Gen. George Patton |
-- A Silicon Graphics Company -+ http://home.cray.com/~glover
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|