« Bugzilla Issues Index
#792 — 9.2.3: dangling else
- bug_id:
792
- creation_ts:
2012-10-13 12:00:00 -0700
- short_desc:
9.2.3: dangling else
- delta_ts:
2012-10-26 15:34:13 -0700
- product:
Draft for 6th Edition
- component:
editorial issue
- version:
Rev 10: September 27, 2012 Draft
- rep_platform:
All
- op_sys:
All
- bug_status:
RESOLVED
- resolution:
FIXED
- priority:
Normal
- bug_severity:
enhancement
- everconfirmed:
true
- reporter:
Michael Dyck
- assigned_to:
Allen Wirfs-Brock
- commentid:
1931
- comment_count:
0
- who:
Michael Dyck
- bug_when:
2012-10-13 12:00:15 -0700
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.
- commentid:
2042
- comment_count:
1
- who:
Allen Wirfs-Brock
- bug_when:
2012-10-25 14:49:34 -0700
corrected in rev 11 editor's draft
- commentid:
2122
- comment_count:
2
- who:
Allen Wirfs-Brock
- bug_when:
2012-10-26 15:34:13 -0700
in October 26, 2012 release draft