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


mputl

テキストファイルに文字列を書き込む

呼び出し手順

r = mputl(txt, file_desc)

引数

r

関数がファイルに正しく書き込んだかどうかをチェックするために %tまたは%fを返します.

file_desc

ファイル名を指定する文字列または

整数スカラー: mopen関すから返されたファイル記述子.

txt

文字列のベクトル.

説明

mputl関数により,文字列ベクトルを 一連の行としてテキストファイルに書き込むことができます.

mputl は,ANSI/アスキー および UTF-8 でエンコードされた文字列をサポートします.

fd = mopen(TMPDIR+'/text_mputl.txt','wt');
mputl('Hello World',fd);
mclose(fd);
mputl('Simple Hello World',TMPDIR+"/text_mputl_simple.txt");
fd = mopen(TMPDIR+'/text_mputl.txt','rt');
disp(mgetl(fd));
mclose(fd);

参照

  • mget — parses numbers in a binary file and returns them as decimals
  • mgetl — アスキーファイルから行を読み込む
  • mclose — オープンされているファイルを閉じる
  • mfprintf — converts, formats, and writes data to a file
  • mput — 指定したバイナリ形式でバイトまたはワードを書き込む
  • mputstr — write a single text in an open file
  • mopen — ファイルをオープン
  • write — フォーマットされたファイルに書き込む
Report an issue
<< mput Files : Input/Output functions mputstr >>

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