aboutsummaryrefslogtreecommitdiffstats
path: root/system/doc/reference_manual/expressions.xml
AgeCommit message (Collapse)Author
2017-05-04Update copyright yearRaimo Niskanen
2017-01-11expressions.xml: Remove superfluous references to OTP R7/R10Björn Gustavsson
2016-07-12Add clarification on LC semantics (#1)Brujo Benavides
It addresses the special case of generator-less LCs. As a bonus, I fixed a typo :)
2016-03-15update copyright-yearHenrik Nord
2016-03-01Generalize bit string comprehensionsBjörn Gustavsson
The expression in a bit string comprehension is limited to a literal bit string expression. That is, the following code is legal: << <<X>> || X <- List >> but not this code: << foo(X) || X <- List >> The limitation is annoying. For one thing, tools that transform the abstract format must be careful not to produce code such as: << begin %% Some instrumentation code. <<X>> end || X <- List >> One reason for the limitation could be that we'll get reduce/reduce conflicts if we try to allow an arbitrary expression in a bit string comprehension: binary_comprehension -> '<<' expr '||' lc_exprs '>>' : {bc,?anno('$1'),'$2','$4'}. Unfortunately, there does not seem to be an easy way to work around that problem. The best we can do is to allow 'expr_max' expressions (as in the binary syntax): binary_comprehension -> '<<' expr_max '||' lc_exprs '>>' : {bc,?anno('$1'),'$2','$4'}. That will work, but functions calls must be enclosed in parentheses: << (foo(X)) || X <- List >>
2016-01-20doc: Update a refman exampleHans Bolinder
2015-09-08doc: Update term comparison with MapsBjörn-Egil Dahlberg
2015-06-18Change license text to APLv2Bruce Yinhe
2015-03-12Update Erlang Reference ManualHans Bolinder
Language cleaned up by the technical writers xsipewe and tmanevik from Combitech. Proofreading and corrections by Hans Bolinder.
2014-11-20Fix spelling and grammarDerek Brown
2014-06-17doc: Fix broken linksBjörn-Egil Dahlberg
2014-05-14doc: Move Maps reference documentation to expressionsBjörn-Egil Dahlberg
2014-04-01doc: Mention map expressions and map guardsBjörn-Egil Dahlberg
2013-12-12Document named fun expressionsAnthony Ramine
2013-04-19Convert XML files to UTF-8Hans Bolinder
2012-08-17Remove support for tuple funsBjörn Gustavsson
Tuple funs were deprecated in R15B (in commit a4029940e309518f5500).
2012-05-15Improve the nice 'badarith' message displayed by the shellHans Bolinder
2011-12-05Fix typos in expressions.xmlTuncer Ayaz
2011-11-07EEP-23: Allow variables in fun M:F/ABjörn Gustavsson
Currently, the external fun syntax "fun M:F/A" only supports literals. That is, "fun lists:reverse/1" is allowed but not "fun M:F/A". In many real-life situations, some or all of M, F, A are not known until run-time, and one is forced to either use the undocumented erlang:make_fun/3 BIF or to use a "tuple fun" (which is deprecated). EEP-23 suggests that the parser (erl_parse) should immediately transform "fun M:F/A" to "erlang:make_fun(M, F, A)". We have not followed that approach in this implementation, because we want the abstract code to mirror the source code as closely as possible, and we also consider erlang:make_fun/3 to be an implementation detail that we might want to remove in the future. Instead, we will change the abstract format for "fun M:F/A" (in a way that is not backwards compatible), and while we are at it, we will move the translation from "fun M:F/A" to "erlang:make_fun(M, F, A)" from sys_pre_expand down to the v3_core pass. We will also update the debugger and xref to use the new format. We did consider making the abstract format backward compatible if no variables were used in the fun, but decided against it. Keeping it backward compatible would mean that there would be different abstract formats for the no-variable and variable case, and tools would have to handle both formats, probably forever. Reference: http://www.erlang.org/eeps/eep-0023.html
2011-11-02Reference manual: Improve the documentation for external funsBjörn Gustavsson
2011-11-01Merge branch 'lukas/erts/large_float_cmp/OTP-9497'Lukas Larsson
* lukas/erts/large_float_cmp/OTP-9497: Update documentation after changes in integer and float comparison Do small optimisation on platforms with 32 bit Eterm Add tests for equality checking Optimize comparison of huge floats and smaller bignums Add tests for comparing large floats and small bignums Cleanup double_to_bignum conversion code Update size of tmp cmp bignum buffer Expand tests for float and number comparison Update heauristic to work on halfword Add heauristics bignum vs float checks Optimise bugnum and small comparison Add float vs integer comparison tests Update integer and floating point number comparisons
2011-10-19Update documentation after changes in integer and float comparisonLukas Larsson
2011-10-13Allow noncharacter code points in unicode encoding and decodingBjörn Gustavsson
The two noncharacter code points 16#FFFE and 16#FFFF were not allowed to be encoded or decoded using the unicode module or bit syntax. That causes an inconsistency, since the noncharacters 16#FDD0 to 16#FDEF could be encoded/decoded. There is two ways to fix that inconsistency. We have chosen to allow 16#FFFE and 16#FFFF to be encoded and decoded, because the noncharacters could be useful internally within an application and it will make encoding and decoding slightly faster. Reported-by: Alisdair Sullivan
2011-03-11Update copyright yearsBjörn-Egil Dahlberg
2011-03-09Reference Manual: Replace "it's" with "its"Björn Gustavsson
"Its" is a possessive pronoun, "it's" is a contraction of "it is".
2010-06-02Return nowarn_bif_clash functionality but with warningPatrik Nyblom
Wrote and changed some tests in stdlib:erl_lint_SUITE nowarn_bif_clash is obsoleted but will remove warnings and errors about bif clashes. The recommended way is to use no_auto_import directives instead. Hopefully erlang.erl is the only user in the world of nowarn_bif_clash.
2010-02-26Reference manual: include is_boolean/1 in the list of guard BIFsBjörn Gustavsson
is_boolean/1 was introduced in R10B, so this is a little bit late...
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP