tracker issue : CF-4205048

select a category, or use search below
(searches all categories and all time range)
Title:

[ANeff] Doc Bug for: Elvis operator doc outdated

| View in Tracker

Status/Resolution/Reason: To Test//HaveNewInfo

Reporter/Name(from Bugbase): Aaron N. / ()

Created: 08/23/2019

Components: Documentation

Versions: 2018

Failure Type: Conflict With Docs

Found In Build/Fixed In Build: 2018.0.0.310608 /

Priority/Frequency: Normal / Some users will encounter

Locale/System: / Platforms All

Vote Count: 0

Issue: CF-4028653's fix is undocumented in the Elvis operator doc.

Issue #1: The 1st paragraph is misleading.

-----------
In an expression, if the resultant value is not defined, then the object will be assigned to the left most part of the expression otherwise a default value (define at the right most part) will be assigned.
-----------

That should probably be:

-----------
It returns the resultant value of its left operand's expression, if that resultant value is defined and not null and not a false value. Otherwise, it returns the resultant value of its right operand's expression (the default value).
-----------

Suggestions:
1) That run-on sentence should be 2 separate sentences.
2) It should be clear that the resultant value of the left operand's expression is only returned if it is defined and not null and not a false value.
3) "left most" should be "leftmost" (this suggestion can be ignored if this wording is removed).
4) "right most" should be "rightmost" (this suggestion can be ignored if this wording is removed).

Issue #2: The description of the 1st code example is misleading.

-----------
In the above example, if userName is defined, it will be assigned to the myDisplayName variable. If the userName is not defined, the value "Anonymous" will be assigned to the myDisplayName variable.
-----------

That should probably be:

-----------
In the above example, if userName is defined and not null and not a false value, it will be assigned to the myDisplayName variable. Otherwise, the value "Anonymous" will be assigned to the myDisplayName variable.
-----------

Suggestions:
5) See suggestion #2 above.

Issue #3: The description of the 2nd code example is misleading.

-----------
In the above example, if getEmployeeName(ID) does not return any value, the value "Joe" will be assigned to the employeeName variable.
-----------

That should probably be:

-----------
In the above example, if getEmployeeName(ID) does not return any value, or if the returned value is a false value, the value "Joe" will be assigned to the employeeName variable.
-----------

Suggestions:
6) See suggestion #2 above.

Related URL: https://helpx.adobe.com/coldfusion/developing-applications/the-cfml-programming-language/elements-of-cfml/elvis-operator.html

Attachments:

Comments: