Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2023.0.0 - 日本語


mclose

オープンされているファイルを閉じる

呼び出し手順

err = mclose([fd])

mclose('all')

引数

fd

スカラー: 関数mopenにより返された fdパラメータがファイル記述子として使用されます.

err

スカラー: エラーインジケータ.

説明

mcloseは,mopenによりオープンされた ファイルを閉じるために使用されます. fdが省略された場合, mcloseは直近にオープンされたファイルを閉じます.

mclose('all')は, file('open',..) または mopenにより オープンされた全てのファイルを閉じます.

これをScilabスクリプトファイルの中で使用する場合には注意してください. スクリプト自体も閉じられるため, Scilab は mclose('all')の後に書かれたコマンドを実行しません.

fd = mopen(TMPDIR + filesep() + 'mclose_tst','wt');
mclose(TMPDIR + filesep() + 'mclose_tst');

fd=mopen('SCI/etc/scilab.start','r')
mgetl(fd,10)
mclose(fd)

参照

  • meof — ファイルの終端に達したかどうかを確認する
  • mfprintf — converts, formats, and writes data to a file
  • fprintfMat — 行列をファイルに書き込む
  • mfscanf — 標準入力から入力を読み込む (C言語の scanf 関数へのインターフェイス)
  • fscanfMat — テキストファイルから行列を読み込む
  • mget — parses numbers in a binary file and returns them as decimals
  • mgetl — アスキーファイルから行を読み込む
  • mgetstr — ファイルから文字列を読み込む
  • mopen — ファイルをオープン
  • mprintf — 変換, 整形し, Scilab主ウインドウにデータを書き込む
  • mput — 指定したバイナリ形式でバイトまたはワードを書き込む
  • mputl — テキストファイルに文字列を書き込む
  • mputstr — write a single text in an open file
  • mscanf
  • mseek — バイナリファイルの中でカレントの位置を設定する.
  • mtell — ファイル先頭基準でカレントバイトのオフセットを返す
  • file — ファイル管理
  • mdelete — ファイルを削除
Report an issue
<< mclearerr Files : Input/Output functions meof >>

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 Mar 07 09:28:49 CET 2023