[Contents] [TitleIndex] [WordIndex

1. Architecture of a Scilab Module (Scilab 5.x and 6.X)

This information may not be up-to-date. Please check howto/Create a toolbox for more up-to-date information

A module can be Scilab macros, java,Tcl/Tk, C, C++ and/or Fortran code. A module can (and should) contains other things like demos, help, unitary tests... This applies to Scilab 5.X. Scilab 4.X is completely different.

1.1. Description

A Scilab module should be composed like this:

Scilab module description


Demos of the module which show features of the module


Configuration of the module (initialization and configuration)


examples (readme.txt)


Help of the module (Scilab help description)


Header files which can be used externaly (other Scilab modules or third party programs)




Scilab macros of the module


Sources to plug the module into Scilab.

Sources should be splited into subdirs (src/c/ src/fortran/...).


Core sources of the module.

Sources should be splited into subdirs (src/c/ src/fortran/...). Local header (.h) should be put here


Unitary tests which will be launched in order to test this module


Non regression tests which will be launched in order to test this module


Benchmarks which will be launched in order to test this module

Mandatory files:

Optional files:

1.2. Conception

The name of the module itself is quite important. It is must be composed only by letters, numbers and a just two special characters (_ or -). In the examples below, the module will be called <my_module_name>.

1.3. Guidelines

1.3.1. Rules for function profile & header declarations

1.4. How to develop a new internal module Step by Step

static OptimTable Tab[]=

TODO : create a skeleton for this

1.4.1. Macro module

  • Create directory SCI/modules/<my_module_name>/macros'

  • edit buildmacros.sce and change genlib arguments

genlib(<21 characters of module's name> + 'lib','SCI/modules/elementaries_functions/macros');

example : elementaries_functions module


1.4.2. Add a help chapter

  • Create a directory SCI/modules/<my_module_name>/help/en_US'

  • Add .xml files
  • Add a file addchapter.sce
  • Modify the file SCI/modules/helptools/etc/MAIN_CHAPTERS to add the module

2022-09-08 09:27