archives

« Bugzilla Issues Index

#792 — 9.2.3: dangling else


In 9.2.3 "The SameValue Algorithm",
step 7 says:
If Type(x) is String, then return true if x and y are exactly the same
sequence of characters (same length and same characters in corresponding
positions); otherwise, return false.

The "if ... if ... otherwise" phrasing is a classic 'dangling else'.
To clarify the logic, introduce a substep. E.g.:

If Type(x) is String, then
a. If x and y are exactly the same sequence of characters [...],
return true; otherwise, return false.

Similarly with step 8.


corrected in rev 11 editor's draft


in October 26, 2012 release draft