Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.0 - English

Change language to:
Français - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
However, this page did not exist in the previous stable version.

Scilab Help >> Advanced functions > comp

comp

scilab function compilation

Calling Sequence

comp(function [,opt])

Arguments

function

a scilab function, not compiled (type 11)

opt

flag with value 0 (default), 1 or 2.

Description

comp(function) compiles the function function. 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 commands exec and deff generate compiled functions. So comp has to be used in very particular cases. To produce uncompiled functions one must use exec or deff 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 — Enables the profiling of a function
  • profile — Returns the profiling results of a function
Report an issue
<< code2str Advanced functions deff >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Fri Apr 11 14:07:05 CEST 2014