On Wed, Dec 12, 2007 at 09:51:59AM +0100, Arjen Markus wrote: > Andrew Ross wrote: > > >>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.
Ah yes. I should have looked more closely at this. Was there a reason you didn't do this for the plvect / plcont functions in the F95 bindings? I'm not sure I would advocate changing this now as we already have plvect / plcont implemented, although with different arguments to their C counterparts. Perhaps you could think about this? Andrew ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel