Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2023.0.0 - Português


edit

edição de funções

Seqüência de Chamamento

edit functionname
edit(functionname, linenumber)
edit functionname linenumber

Parameters

functionname

string

linenumber

positive integer (of type 1 or 10)

Descrição

Se functionname for o nome de uma função Scilab definida, edit(functionname) tente abrir o arquivo associado functionname.sci.

Se functionname não for encontrado como uma função Scilab definida, mas corresponder às regras de nomeação das funções do Scilab, edit(functionname) cria o arquivo functionname.sci no diretório TMPDIR.

Se functionname for um caminho de arquivo ou uma expressão que não corresponde às regras de nomenclatura da função do Scilab, edit(functionname) abre o caminho + nome do arquivo functionname.

Se linenumber for fornecido, o arquivo será aberto nessa linha dentro do bloco function / endfunction, definindo a macro nomeada como o próprio arquivo. Se a definição da função functionname não for encontrada no arquivo, o arquivo será aberto no número de linha absoluta linenumber.

Exemplos

// abre o editor com o texto dessa função
edit edit

// abre o editor para uma nova função, 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
edit(SCIHOME+"/scilab.ini")

// 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

Histórico

VersionDescription
5.3.1 New linenumber input option.
6.1.0 linenumber can now be of type text as "23".
Report an issue
<< Script editor Script editor 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:
Mon Mar 27 09:50:00 GMT 2023