WriteString

WriteString["file","string"]

"string" 写入文件.

WriteString[channel,"string"]

"string" 写入流或进程.

WriteString[channel,expr1,expr2,]

expri 转换为串,然后以序列形式把它们写到指定的输出通道.

更多信息

范例

打开所有单元关闭所有单元

基本范例  (2)

对临时文件写入字符串:

输出文件:

关闭文件:

删除临时文件:

打开一个流:

将表达式输出到数据流中:

关闭数据流:

读取最后文件:

范围  (1)

将一个字符串写入 File 对象中:

输出该文件:

删除文件:

属性和关系  (1)

WriteString 不会自动插入换行符:

WriteLine 则可在字符串后自动插入换行符:

删除临时文件:

Wolfram Research (1988),WriteString,Wolfram 语言函数,https://reference.wolfram.com/language/ref/WriteString.html (更新于 2016 年).

文本

Wolfram Research (1988),WriteString,Wolfram 语言函数,https://reference.wolfram.com/language/ref/WriteString.html (更新于 2016 年).

CMS

Wolfram 语言. 1988. "WriteString." Wolfram 语言与系统参考资料中心. Wolfram Research. 最新版本 2016. https://reference.wolfram.com/language/ref/WriteString.html.

APA

Wolfram 语言. (1988). WriteString. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/WriteString.html 年

BibTeX

@misc{reference.wolfram_2024_writestring, author="Wolfram Research", title="{WriteString}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/WriteString.html}", note=[Accessed: 21-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_writestring, organization={Wolfram Research}, title={WriteString}, year={2016}, url={https://reference.wolfram.com/language/ref/WriteString.html}, note=[Accessed: 21-November-2024 ]}