Write# Statement

Writes data to a sequential text file with delimiting characters.

tip

Use Print# statement to print data to a sequential text file. Use Put# statement to write data to a binary or a random file.


Syntax:

Write Statement diagram


Write [#fileNum] {,|;} expression [, …]

Parameters:

fileNum: Any numeric expression that contains the file number that was set by the Open statement for the respective file.

expression list: Variables or expressions that you want to enter in a file, separated by commas.

式リストを省略すると、Write 文が空の行をファイルに追加します。

新規のファイルにせよ既存のファイルにせよ、データを書き込む場合は、該当ファイルを Output またはAppend モードでオープンしておく必要があります。

記述した文字列は引用符で囲まれ、コンマで区切られます。 式リストにこれらの区切り記号を入力する必要はありません。

Write ステートメントは、行と記号を最後の項目として出力します。

小数点のある数値は、ロケール設定に従って変換されます。

Example:

ご支援をお願いします!