edit
関数を編集
呼出し手順
edit functionname edit(functionname, linenumber) edit functionname linenumber
引数
- functionname
文字列
- linenumber
整数
説明
functionname が定義済みの
Scilab関数の名前の場合,
edit(functionname) は
関連するファイル functionname.sci を
オープンします.
functionnameが未定義のScilab関数の名前の場合,
edit はカレントのディレクトリに
functionname.sciファイルを作成します.
functionname が有効なマクロまたは
関数名でない場合,
edit(functionname) は
functionnameに等しいファイル名を有する
ファイルをオープンします.
linenumber が指定された場合,
ファイルはファイル名自体と同じ名前のマクロの
定義を基準としてこの行でオープンします.
マクロ定義が見つからない場合,
ファイルが指定したlinenumber行目で
オープンされます.
例
//この関数へのテキストを指定したエディタをオープン edit edit //新しい関数に関してエディタをオープン in TMPDIR edit myfunction // Opens or creates the file foo.sce in the current working directory edit foo.sce //SCIHOMEディレクトリのファイルscilab.iniをオープン edit(SCIHOME+"/scilab.ini") // test_run()の定義を基準として ファイルtest_run.sciの123行目をオープン edit('test_run', 123) // Same thing with an inline syntax (line number as text): edit test_run 123
参照
履歴
| バージョン | 記述 |
| 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 >> |