Andrew Ross wrote:
On Wed, Dec 12, 2007 at 09:20:46AM +0100, Arjen Markus wrote:
  
Andrew Ross wrote:

    
plvec2 is equivalent to calling plvect with the pltr2 function as the
pltr. This only affects the location of the vectors, not the direction /
magnitude. 

The only reason for plvec2 etc is that fortran (and several other bindings)
don't allow you to pass a function name as an argument. They provided a
limited subset of the possible functionality of plvect.
 

      
Hello Andrew,

is that the reason for plvec2? Because Fortran, ever since it supported 
user-defined
functions, so at least from FORTRAN IV onwards, has supported passing
function names as arguments. There is an important limitation vis-a-vis 
the _data_
that you can pass - that is: no equivalent to (void *) types, but 
function names are
no problem at all!
    

As far as I understand it, this was the issue. Remeber that the function
has to be converted to a C function argument that can be passed to the C
API of the plplot library, and not just called by other fortran code. 
Can this be done? 
  
Yes, it can. I do not have the source code at hand right now, but I remember
doing just that for the Fortran 90 interface - for plmap(), IIRC. I wrote a small C wrapper that gets
the function name/address and then calls the Fortran routine. It was a bit tricky because
of different calling conventions on Windows, but with such a wrapper it is quite possible.

Regards,

Arjen