我尝试了所有选项来在我的输出文件中创建一个新行,但我仍然得到一个 txt 文件,其中包含先前信息背后的所有内容。即使有这个超级简单的代码:
全局 [文件]
to setup clear-all
set file "results\\GA1.txt" if is-string? file
[while [file-exists? file]
[set file replace-item (length file - 5) file "11" ]
file-open file] end
to go tick write-to-file end
to write-to-file file-print (word ticks) FILE-TYPE "\n" file-write 1 file-print (word " " 2 ";") file-write 1 file-print (word " " 2 ";") file-print "" ;; blank line end
我没有得到空行或换行符。我在 NetLogo 4.1 工作。有谁知道可能是什么问题?