Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.1.0 - Français

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

Please note that the recommended version of Scilab is 2024.1.0. This page might be outdated.
See the recommended documentation of this function

Aide de Scilab >> Editeur de script > edit


edits a given Scilab function or file


edit functionname
edit(functionname, linenumber)
edit functionname linenumber



character string


positive integer (of type 1 or 10)


If functionname is the name of a defined scilab function, edit(functionname) tries to open the associated source file functionname.sci.

If functionname is not found as a defined Scilab function but matches naming rules of Scilab functions, edit(functionname) creates the file functionname.sci file in the TMPDIR directory.

If functionname is a file path or an expression not matching Scilab functions naming rules, edit(functionname) opens the file with file name equal to functionname.

If linenumber is given, the file is opened at this line inside the function/endfunction block defining the macro named as the file itself. If the definition of the function functionname is not found in the file, the file is opened at the absolute line number linenumber.


// Opens editor with text of this function
edit edit

// Opens editor for a new function, creating the file myfun.sci in TMPDIR
edit myfunction

// Opens or creates the file foo.sce in the current working directory
edit foo.sce

// Opens the file scilab.ini in the SCIHOME directory

// Opens the file test_run.sci in which test_run() is defined,
// at line 123 inside the test_run() function block:
edit('test_run', 123)

// Same thing with an inline syntax (line number as text):
edit test_run 123

See also

  • editor — Call the text editor as defined in the preferences
  • scinotes — Scinotes: Embedded Scilab text editor
  • manedit — editing a manual item
  • names — Règles de nommage des variables et fonctions
  • editvar — Scilab variable editor
  • ged — Scilab Graphic Editor


5.3.1 New linenumber input option.
6.1.0 linenumber can now be of type text as "23".
Report an issue
<< Editeur de script Editeur de script edit_error >>

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:
Tue Feb 25 08:50:45 CET 2020