User Tools

Site Tools


cs326:formatted_output

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
cs326:formatted_output [2018/02/16 14:56]
scarl
cs326:formatted_output [2018/02/16 15:00] (current)
scarl
Line 63: Line 63:
 list: [1,2,3], tuple: {1,2} list: [1,2,3], tuple: {1,2}
 :ok :ok
 +
 +iex> :​io.format("​~~p is like ~~w, but tries to be sensible with long lines ~p", ​       ​
 +...(10)> [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22]])
 +~p is like ~w, but tries to be sensible with long lines [1,​2,​3,​4,​5,​6,​7,​8,​9,​10,​
 +                                                         ​11,​12,​13,​14,​15,​16,​17,​
 +                                                         ​18,​19,​20,​21,​22]:​ok
 </​code>​ </​code>​
  
 Complete docs on the :io.format function are on the [[http://​erlang.org/​doc/​man/​io.html#​format-2|Erlang STDLIB website]], but be warned, it is extensive. Note that in Erlang the function is invoked as io::​format(...)  ​ Complete docs on the :io.format function are on the [[http://​erlang.org/​doc/​man/​io.html#​format-2|Erlang STDLIB website]], but be warned, it is extensive. Note that in Erlang the function is invoked as io::​format(...)  ​
cs326/formatted_output.1518814600.txt.gz ยท Last modified: 2018/02/16 14:56 by scarl