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.


语法:

Write Statement diagram


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

参数:

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」语句,其结尾用一个行结束符号输出。

根据区域设置,转换带小数分隔符的数值。

示例:

请支持我们!