next up previous contents
Next: Input and output of Up: Programming Scilab Previous: `Sci' files   Contents

Programming in Fortran or C

Scilab can use software programmed in other languages too. There can be several reasons to do that. It can be necessary when we have some code in these languages and we need to incorporate it to our program. In other instances the program runs slowly and it is difficult to eliminate the critical segments that produce the ineffectiveness. Scilab admits routines programmed in C or Fortran. Chapter 6 of the user's guide is dedicated to interfacing other languages with Scilab. We can incorporate routines in Fortran or C by dynamic linking, which means that the function has been previously compiled (with other compilers) and Scilab calls the object code. The principal difficulty is the creation of an adequate interface. To do that, it is necessary to create an intermediate program in Scilab. After this step, functions are linked and can be used. The process is relatively direct and it is very well explained in the user's manual.

Functions created in these languages can be added to Scilab by a permanent link and we can add a new `primitive'. Functions called `primitive' are basic functions not programmed in Scilab which are used as the elements with which Scilab functions are built.


next up previous contents
Next: Input and output of Up: Programming Scilab Previous: `Sci' files   Contents
je 2006-10-13