Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:19
erlang
0948-Spell-out-how-bit-strings-are-compared.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0948-Spell-out-how-bit-strings-are-compared.patch of Package erlang
From 7cfb3d421479a0574228f91494b8f213ed1521ed Mon Sep 17 00:00:00 2001 From: Magnus Henoch <magnus.henoch@gmail.com> Date: Thu, 25 Jun 2020 15:17:10 +0100 Subject: [PATCH] Spell out how bit strings are compared The documentation already spells out how all other data types are compared, so let's mention how bit strings are compared as well. Also add two examples. --- system/doc/reference_manual/expressions.xml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/system/doc/reference_manual/expressions.xml b/system/doc/reference_manual/expressions.xml index fd8f71ed89..9747cc9a04 100644 --- a/system/doc/reference_manual/expressions.xml +++ b/system/doc/reference_manual/expressions.xml @@ -574,6 +574,8 @@ number < atom < reference < fun < port < pid < tuple < map <p>Lists are compared element by element. Tuples are ordered by size, two tuples with the same size are compared element by element.</p> + <p>Bit strings are compared bit by bit. If one bit string is a + prefix of the other, the shorter bit string is considered smaller.</p> <p>Maps are ordered by size, two maps with the same size are compared by keys in ascending term order and then by values in key order. In maps key order integers types are considered less than floats types. @@ -601,8 +603,13 @@ false false 4> <input>#{c => 3} > #{a => 1, b => 2}.</input> false -4> <input>#{a => 1, b => 2} == #{a => 1.0, b => 2.0}.</input> -true</pre> +5> <input>#{a => 1, b => 2} == #{a => 1.0, b => 2.0}.</input> +true +6> <input><<2:2>> < <<128>>.</input> +true +7> <input><<3:2>> < <<128>>.</input> +false +</pre> </section> <section> -- 2.26.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor