From: Arjen M. <arj...@wl...> - 2006-05-17 06:33:10
|
Alan W. Irwin wrote: > > I have asked Arjen to change (if it is possible to do so) the way we > treat > call-back functions in our fortran 95 interface and examples so > hopefully we > will see a further fortran change from him in the next day or so. Callback functions as such are no particular problem - see for instance example x19f. The real problem is the use of an "untyped" argument for these functions, if we really want to be this general. Fortran does not have an equivalent for (void *). There are ways around it, but at a cost. For now I would rather like to consolidate the various flavours we have now under one overloaded name - where the list of arguments determines the actual version to be used. I can imagine a function/subroutine that takes its specfic data from a different source (a global/module variable for instance). That is easy to add. Another solution is the use of a fixed data type that is general enough for common cases - an array of reals perhaps. The most general case would require some Fortran magic or a function/subroutine with an unspecified interface. Hm, I do not want to go that route yet. Regards, Arjen |