[Scilab-Dev] Fortran interfaces in a toolbox

Serge Steer Serge.Steer at inria.fr
Fri Oct 8 08:48:54 CEST 2010


Le 07/10/2010 22:20, Jean-Pierre Dussault a écrit :
> Hi!
>
> the toolbox_skeleton as well as the instructions at
>
>     http://wiki.scilab.org/howto/Create_a_toolbox 
>
> wrap the example fortran  fsum  into a C-wrapper. However, there
> exists a "fort" command in scilab which allows to interface directly a
> fortran function. Why then use the complicated fortran --> C -->
> scilab path instead of fortran --> fort(...)?
>
> Further complications arise when dealing with non-scalar variables
> which will have to be properly converted in C before being properly
> transmitted to scilab while the instruction "fort" takes care of this
> easily while hiding cumbersome conversion details.
>
> Will the "fort" command remain in scilab? If so, we will stick to
> using it!
>
> Thx,
>
> JPD
>
> P.S. In the toolbox_skeleton (scilab binary distribution),  csum.h 
> and  csub.h  are missing.
Using gateways instead of fort is generally more efficient, because the
argument compatibility tests,... are made in C instead of in Scilab code.
Moreover fort as limitations: it is not possible to pass array of
strings, short integers, function as arguments.

Serge Steer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/dev/attachments/20101008/d30b7404/attachment.htm>


More information about the dev mailing list