OpenWrite

OpenWrite["file"]

打开一个文件,将输出写入该文件,并返回一个 OutputStream 对象.

OpenWrite[]

打开您的计算机系统上的临时文件的默认区域中的一个新文件.

更多信息和选项

范例

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

基本范例  (1)

创建并打开一个新的流以写入:

将表达式写入数据流中:

关闭数据流:

显示所得文件:

范围  (1)

把表达式写入由 File 对象指定的文件:

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

文本

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

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