<< mput Files : Input/Output functions mputstr >>

Scilab Help >> Files : Input/Output functions > mputl

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);

参照


Report an issue
<< mput Files : Input/Output functions mputstr >>