This document describes the changes made to the STDLIB application.
TraverseFun
and
LookupFun
, are now allowed to return a term other
than a list. Such a term is immediately returned as the
results of the current query, and is useful mostly for
returning error tuples.error_logger_file_h
and
error_logger_tty_h
now read the environment
variable utc_log
from the SASL application.ets:info/1
has been corrected to behave according
to the documentation and return a list of tuples, not a
tuple with tuples..hrl
file is included using
-include_lib
, the include path is temporarily
updated to include the directory the .hrl
file was
found in, which will allow that .hrl
file to itself
include files from the same directory as itself using
-include
. (Thanks to Richard Carlsson.)filelib:ensure_dir/1
which sometimes
returned true
and sometimes ok
to always
return ok
when successful. This goes against the
documentation which said true
, but ok
was
judged to be a more logical return value.{Module, Function}(ArgList)
.lists:ukeysort/2
and
lists:ukeymerge/3
have been changed in such a way
that two tuples are considered equal if their keys
match.lists:usort/2
and
lists:umerge/3
have been modified too: two elements
are considered equal if they compare equal.file_sorter
module has been modified in a
similar way: the unique
option now applies to the
key (keysort()
and keymerge()
) and the
ordering function (the option {order, Order}
).ets:update_counter/3
; failure with badarg
also if the counter to be updated is the key.file_sorter
module
and an ordering fun, the sort was not always stable. This
bug has been fixed.
compile
attribute is recognized after
function definitions.nowarn_deprecated_function
can be used for
turning off warnings for calls to deprecated functions.
{nowarn_unused_function,[{Name,Arity}]}
turns off
warnings for unused local functions for the mentioned
functions. The new options
{nowarn_deprecated_function,[{Module,Name,Arity}]}
and {nowarn_bif_clash,[{Name,Arity}]}
work
similarly.epp
now recognizes
the file
attribute. This attribute is meant to be
used by tools such as Yecc that generate source code
files.~s
of io:fwrite
and
io_lib:fwrite
has been extended to handle arguments
that are binaries or I/O lists.p
and P
of the
Format
argument of the functions
io:format/2,3
and io_lib:format/2
have been
changed as to display the contents of binaries containing
printable characters as strings.export
attributes.stdlib(6)
. It
mentions the configuration parameters for the Erlang
shell.zip
module with functions for reading
and creating zip archives. See zip(3)
.dict
instead of a list. This
significantly improves performance when there are many
dynamic supervised child processes. (Thanks to Mickaël
Rémond et al.)strict_record_tests
',
the compiler will generate code that verifies the record
type for 'R#record.field
' operations in guards. Code
that verifies record types in bodies has already been
generated since R10B, but in this release there will be a
'{badrecord,RecordTag}
' instead of a
'badmatch
' if the record verification test fails.
See the documentation for the compile
module for
more information.erl_pp
) now tries to
insert line breaks at appropriate places.public
option has been removed from
digraph:new/1
. The reason is that several
functions in the digraph
module are implemented
using multiple ETS accesses, which is not thread safe.
(Thanks to Ulf Wiger.)lists:keyreplace/4
checks that the
fourth argument (NewTuple
) is a tuple.beam_lib(3)
. (Thanks
to Mats Cronqvist who wrote the example.)warn_unused_record
is used
for finding unused locally defined record types.
shell_default:xm/1
has been added. It calls
xref:m/1
.deprecated
attribute did
not take the compile option export_all
into
account. This bug has been fixed.try/catch
correctly. This bug has been fixed.lists:nthtail/3
.lists:keymap/3
.lists(3)
.timer:now_diff/2
.gen_fsm(3)
,
gen_server(3)
, io_lib(3)
and lib(3)
.
lists.erl
.
erl_expand_records
expands
records in abstract code. It is used by the Erlang shell,
which means that Compiler is no longer used by the shell.
megaco:format_versions/1
function is deprecated.
gen_server:enter_loop
with a
registered server name, it was only checked that the
registered name existed, not that it actually was the
name of the calling process.
beam_lib:version/1
in
documentation.io:read/3
works like
io:read/1,2
but takes a third argument,
StartLine
.gen_fsm:enter_loop/4,5,6
, similar
to gen_server:enter_loop/3,4,5
, has been added.c:i/1
is now exported.
sofs
.-define(S(S), ??S).
' was circular,
which it isn't. (Thanks to Richard Carlsson.)
erl_pp
did not
handle the new 'fun M:F/A
' construct in all
situations. This problem has been fixed.
erts:info/1
has been corrected.erlang:statistics/1
now
lists all possible arguments.fun M:F/A
construct.lists:map(bad_fun, [])
' used to return
'[]
' but now causes an exception.ets
module was removed. (Thanks to Dialyzer.)c:i/0
function will now run in a paged mode if
there are more than 100 processes in the system. (Thanks
to Ulf Wiger.)erlang:system_info(process_count)
has been
optimized and does now return exactly the same value as
length(processes())
. Previously
erlang:system_info(process_count)
did not include
exiting processes which are included in
length(processes())
.+P
flag for erl
, which sets the maximum
number of processes allowed to exist at the same, no longer
accepts values higher than 134217727. (You will still
probably run out of memory before you'll be able to reach
that limit.)
beam_lib
and its
documentation.
erlang:port_info/1
BIF is now documented.
Minor corrections of the documentation for
erlang:port_info/2
.math
module that all functions are not available on all
platforms.+c
' option in
the erl
man page in the ERTS documentation.fun M:F/A
construct creates a fun that
refers to the latest version of M:F/A
. This syntax is
meant to replace tuple funs {M,F}
which have many
problems.is_function(Fun,A)
(which may be
used in guards) test whether Fun
is a fun that can be
applied with A
arguments. (Currently, Fun
can
also be a tuple fun.)
filelib:wildcard/2
was broken (it ignored its
second argument).filelib:wildcard("Filename")
(where the
argument does not contain any meta-characters) would
always return ["Filename"]
. Corrected so that an
empty list will be returned if "Filename"
does not
actually exist. (Same correction in
filelib:wildcard/2
.) (This change is a slight
incompatibility.)filelib:wildcard/1,2
will generate a different
exception when given bad patterns such as "{a,"
. The
exception used to be caused by
'exit(missing_delimiter)
' but is now
'erlang:error({badpattern,missing_delimiter})
'.
encrypt_debug_info
for compiler.
compile
on how to provide the key
for encrypting, and the documentation for beam_lib
on how to provide the key for decryption so that tools such
as the Debugger, xref
, or cover
can be used.
beam_lib:chunks/2
functions now accepts an
additional chunk type compile_info
to retrieve
the compilation information directly as a term. (Thanks
to Tobias Lindahl.)
erl_pp
now correctly pretty-prints fun F/A
.
ets:match/2
. Also clarified that
ets:update_counter/3
updates the counter atomically.
(Thanks to Anders Svensson.)
async_shell_start
and has
been documented. New shells started from the JCL menu are
not syncronized with init
anymore. This makes it
possible to start a new shell (e.g. for debugging purposes)
even if the initial shell has not come up.snmp
module.c:zi/0
has been removed. Use
c:i/0
instead.shell:start_restricted/1
has been used)
would crash the shell evaluator. A debug printout in
gen_fsm
had a clause that would never match; causing
less information to be printed.rpc:yield/1
would crash unless the call
started by rpc:async_call/4
had already finished;
rpc:nb_yield(Key,infinity)
would also crash.erlang:dmonitor_p/2
.
dbg
when tracing to wrap trace files has
been corrected. It failed to delete any already existing
wrap trace files with the same names when starting a new
wrap trace.ordsets:is_set(NoList)
, where NoList
is any
term except a list, would crash. For consistency with
sets:is_set/1
and gb_sets:is_set/1
, it now
returns false
.erlang:raise/3
has been added. See the manual
for details. It is intended for internal system programming
only, advanced error handling.
deprecated
attribute is now checked by the
linter. See xref(3)
for a description of the
deprecated
attribute.
io:format/2
et.al no longer crashes for some
combinations of precision and value for format character
"g". Previously it crashed if the precision P was 4 or lower
and the absolute value of the float to print was lower
than 10^4 but 10^(P-1) or higher. Now it will not crash
depending on the value of the float.gb_sets:del_element/2
was changed to do the
same as gb_sets:delete_any/2
which was the
original intention, not as gb_sets:delete/2
. Code
that relies on gb_sets:del_element/2
causing an
error if the element does not exist must be changed to
call gb_sets:delete/2
instead.gb_sets
, sets
, and
ordsets
was added.
dets:match/1,3
, dets:match_object/1,3
, and
dets:select/1,3
has been reduced. This affects the
amount of data Mnesia sends between nodes while
evaluating QLC queries.
-rsh
switch for starting a remote shell
(introduced with OTP-5210) clashed with an already existing
switch used by slave
. Therefore the switch for
the remote shell is now instead named -remsh
.
-rsh
flag which
gives you a remote initial shell instead of a local one.
Example:erl -sname this_node -rsh other_node@other_hostOwn Id: OTP-5210
lists
module has been updated
with decscription of the new zip
, unzip
,
and partition/2
functions.shell
commands rr/1,2,3
now accepts
wildcards when reading record definitions from BEAM
files.