tracker issue : CF-4120079

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

Docs for isBoolean() wrong

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)

Created: 02/20/2016

Components: Documentation, General

Versions: 2016

Failure Type: Usability Issue

Found In Build/Fixed In Build: CF2016_Final /

Priority/Frequency: Minor / Few users will encounter

Locale/System: ALL / Platforms All

Vote Count: 0

https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-functions/functions-in-k/isboolean.html

It says this: 

Parameter / Description
value / Number or string

It does not take only a number or a string, it - almost by definition!! - takes any value at all. This is what it's *for*: taking any value and checking if it can be used as a boolean.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4120079

External Customer Info:
External Company:  
External Customer Name: Adam Cameron
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

Can we say that the method can accept variables as well. "Can take any value such as a number, string, struct etc., or a variable containing one." Also, can't we continue to use the old example.
Comment by Piyush K.
4529 | February 24, 2016 08:27:15 AM GMT
No, don't do that: it makers you sound thick. You're implying that it's only either a literal value or a variable that can be used, and that's wrong: the function will take any expression that evaluates to an appropriate value. booleanFormat(1+1) booleanFormat(listLen("a,b,c")) No literal or variable names in sight. But you don't need to explain it. Saying "value" is implicit that it can be derived from any mechanism to provide said value. That's CS 101.
Comment by External U.
4530 | February 24, 2016 08:38:05 AM GMT
Sorry... isBoolean()... same diff though
Comment by External U.
4531 | February 24, 2016 08:39:54 AM GMT
And regarding this: > Also, can't we continue to use the old example No. The example is rubbish. Get rid of all the mark-up and just demonstrate the function. You don't need an HTML forum to demonstrate a CFML function. That's just daft. Plus the CFML code is bad anyhow. You just need something like this: https://cfdocs.org/isboolean
Comment by External U.
4532 | February 24, 2016 08:42:58 AM GMT