comp - Scilab function compilation (original) (raw)
Scilab 5.3.3
- Scilab help
- Scilab
- Scilab keywords
- TMPDIR
- abort
- add_demo
- argn
- banner
- boolean
- break
- clear
- clearfun
- clearglobal
- comp
- continue
- debug
- delbpt
- dispbpt
- edit
- errcatch
- errclear
- error
- error_table
- exists
- exit
- external
- extraction
- format
- funcprot
- funptr
- getdebuginfo
- getmd5
- getmemory
- getmodules
- getos
- getscilabmode
- getshell
- getvariablesonstack
- getversion
- gstacksize
- ieee
- insertion
- intppty
- inv_coeff
- iserror
- isglobal
- lasterror
- macr2lst
- macr2tree
- matrices
- matrix
- mode
- mtlb_mode
- names
- newfun
- null
- pause
- perl
- poly
- predef
- quit
- rational
- readgateway
- resume
- sciargs
- scilab
- setbpt
- stacksize
- startup
- symbols
- testmatrix
- type
- typename
- user
- varn
- ver
- warning
- what
- where
- whereami
- who
- who_user
- whos
- with_atlas
- with_javasci
- with_macros_source
- with_module
- with_pvm
- with_texmacs
- with_tk
Please note that the recommended version of Scilab is 2026.0.1. This page might be outdated.
However, this page did not exist in the previous stable version.
Scilab help >> Scilab > comp
scilab function compilation
Calling Sequence
Arguments
function
a scilab function, not compiled (type 11)
opt
flag with value 0 (default), 1 or 2.
Description
comp(function) compiles the functionfunction. Compiled and interpreted functions are equivalent but usually compiled functions are much faster. The functions provided in the standard libraries are compiled.
The online definition as well as the short syntax of the commandsexec and deff generate compiled functions. So comp has to be used in very particular cases. To produce uncompiled functions one must use exec ordeff with the option "n".
The value opt==2 causes the function to be compiled "for profiling". Note that now it is possible to add profiling instruction after compilation using the add_profiling function.
The obsolete opt==1 option was specific to code analysis purposes and is now ignored, i.e treated as opt==0.
Note: the compilation takes part "in place", i.e the original function is modified and no new object is created.
See Also
- type — Returns the type of a variable
- deff — on-line definition of function
- exec — script file execution
- function — opens a function definition
- add_profiling — Adds profiling instructions to a function.
- profile — extract execution profiles of a Scilab function