【发布时间】:2015-05-21 04:37:34
【问题描述】:
我想将整数值打印到文件中。我可以将字符串值写入文件,但是当我尝试写入整数值时会出错:
%this works fine
{ok, F}=file:open("bff.txt", [read,write]),
Val="howdy",
file:write(F,Val).
%this gets compiled, but results in error {error, badarg} while executing
{ok, F}=file:open("bff.txt", [read,write]),
Val=23424,
file:write(F,Val).
有什么建议吗?
实际上,我想为 Web 服务器编写一个基准测试代码,我需要将所有时间值和请求数写入输出文件,然后我将使用它用 gnuplot 绘制图形。
【问题讨论】:
标签: erlang