Skip to content

Commit

Permalink
Editorial: Explictly 'convert' numeric value to code unit in CodePoin…
Browse files Browse the repository at this point in the history
…tToString (#2018)
  • Loading branch information
jmdyck authored and ljharb committed Nov 29, 2020
1 parent 5c8edf7 commit d5948f7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -10220,9 +10220,9 @@ <h1>Static Semantics: UTF16EncodeCodePoint ( _cp_ )</h1>
<p>The abstract operation UTF16EncodeCodePoint takes argument _cp_ (a Unicode code point). It performs the following steps when called:</p>
<emu-alg>
1. Assert: 0 &le; _cp_ &le; 0x10FFFF.
1. If _cp_ &le; 0xFFFF, return the String value consisting of _cp_.
1. Let _cu1_ be floor((_cp_ - 0x10000) / 0x400) + 0xD800.
1. Let _cu2_ be ((_cp_ - 0x10000) modulo 0x400) + 0xDC00.
1. If _cp_ &le; 0xFFFF, return the String value consisting of the code unit whose value is _cp_.
1. Let _cu1_ be the code unit whose value is floor((_cp_ - 0x10000) / 0x400) + 0xD800.
1. Let _cu2_ be the code unit whose value is ((_cp_ - 0x10000) modulo 0x400) + 0xDC00.
1. Return the string-concatenation of _cu1_ and _cu2_.
</emu-alg>
</emu-clause>
Expand Down

0 comments on commit d5948f7

Please sign in to comment.