<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<div>[Thu Jul 12 10:24:48 CEST 2018 Adam Lindberg wrote:]<br>
> Haven't found any information anywhere in the changelogs about this,<br>
> but there seems to be a regression in the way io:format/1+2 works.<br>
><br>
> It used to be possible to call it with a mixed IO list of binaries and<br>
> strings (iodata()), but this is no longer possible:<br>
><br>
>     14> io:format(["foo", "bar"]).<br>
>     foobarok<br>
>     15> io:format([<<"foo">>, "bar"]).<br>
>     ** exception error: bad argument<br>
>          in function  io:format/3<br>
>             called as io:format(<0.63.0>,[<<"foo">>,"bar"],[])<br>
><br>
> It seems it was never documented, as the format was always 'atom() |<br>
> string() | binary()', but in practice 'iodata()' was allowed. Is this<br>
> change intentional or is it a bug?<br>
<br>
The change is a consequence of some refactoring (OTP-14983, option<br>
'chars_limit'). Thanks for pointing it out; I didn't notice the change.<br>
<br>
We'll make your example work in Erlang/OTP 21.1. See commit <span class="sha-block">
<span class="sha user-select-contain">2d04d2b.</span></span><br>
<br>
And we'll consider introducing better runtime checking of the Format<br>
argument in Erlang/OTP 22.0. The reason is that control sequences are<br>
ignored if Format is, for instance, a list of binaries.<br>
<br>
Best regards,<br>
<br>
Hans Bolinder, Erlang/OTP team, Ericsson<br>
<br>
</div>
</div>
</body>
</html>