Title:
Bug 87000:it would be nice to have a toBoolean() function that would return true or false based on the argument
| View in TrackerStatus/Resolution/Reason: Closed/Won't Fix/
Reporter/Name(from Bugbase): Steve Onnis / Steve Onnis (Steve Onnis)
Created: 08/01/2011
Components: Language, Functions
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 0000 /
Priority/Frequency: Trivial / Unknown
Locale/System: English / Platforms All
Vote Count: 0
Problem:
it would be nice to have a toBoolean() function that would return true or false based on the argument.The reson for this is so that you can handle strings as bolleans without having to check them manualy.For example, this will error<cfset varname = ""><cfif varname>true<cfelse>false</cfif>If we could have something like...<cfset varname = ""><cfif toBoolean(varname)>true<cfelse>false</cfif>we would be able to avoid this sort of error
Method:
Result:
cannot convert the value "''" to a boolean
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3043923
External Customer Info:
External Company:
External Customer Name: Steve Onnis
External Customer Email: 6B4F6ECA439559160AAC0C16
External Test Config: 08/01/2011
Attachments:
Comments: