<div dir="ltr">Hello,<div><br></div><div>Recently I tried the following:</div><div><br></div><div><div>82> io:format("~s~n", [os:cmd("ls -l")]). </div><div>total 12</div><div>-rw-r--r-- 1 dai users 2692 Jan 5 18:28 input_output.beam</div>
<div>-rw-r--r-- 1 dai users 4581 Jan 5 18:28 input_output.erl</div><div><br></div><div>ok</div><div>83> io:format("~f~n", [20 * 20]). </div><div>** exception error: bad argument</div><div> in function io:format/3</div>
<div> called as io:format(<0.26.0>,"~f~n",[400])</div></div><div><br></div><div>It struck me as a little odd that while I can execute system functions in a list (right before printing to console), but not system operations. Am I missing something? When can you do one, but not the other? Or have I simply misunderstood something?</div>
</div>