From 380af78843891b0994f625d392fad674c1bc4fef Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Mon, 4 Jun 2018 13:58:02 +0200 Subject: stdlib: Make pP insert no line breaks with field width zero See also https://bugs.erlang.org/browse/ERL-607. A zero field width used to insert line breaks "everywhere", but with this patch no line breaks are inserted. --- lib/stdlib/doc/src/io.xml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'lib/stdlib/doc/src') diff --git a/lib/stdlib/doc/src/io.xml b/lib/stdlib/doc/src/io.xml index f1037ec76b..d4a2713840 100644 --- a/lib/stdlib/doc/src/io.xml +++ b/lib/stdlib/doc/src/io.xml @@ -4,7 +4,7 @@
- 19962017 + 19962018 Ericsson AB. All Rights Reserved. @@ -332,11 +332,22 @@ Here T = [{attributes,[[{id,age,1.5}, {tag,{'PRIVATE',3}}, {mode,implicit}] ok + +

As from Erlang/OTP 21.0, a field width of value + 0 can be used for specifying that a line is + infinitely long, which means that no line breaks + are inserted. For example:

+ +
+5> io:fwrite("~0p~n", [lists:seq(1, 30)]).
+[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]
+ok
+

When the modifier l is specified, no detection of printable character lists takes place, for example:

-5> S = [{a,"a"}, {b, "b"}].
-6> io:fwrite("~15p~n", [S]).
+6> S = [{a,"a"}, {b, "b"}],
+   io:fwrite("~15p~n", [S]).
 [{a,"a"},
  {b,"b"}]
 ok
-- 
cgit v1.2.3