Name
YesNoFormat
Synopsis
YesNoFormat(value
)
Returns all non-zero values as Yes
and zero values
as No
. Also returns a Boolean
True
as Yes
and a Boolean
False
as No
. Note that Version
4.01 of ColdFusion contains a bug in the YesNoFormat( )
function that causes certain negative decimal values to
evaluate incorrectly. This behavior was fixed in ColdFusion 4.5. Here
are some examples of the function applied to different values:
<CFOUTPUT> -1: #YesNoFormat(-1)#<BR> -1.123: #YesNoFormat(-1.123)#<BR> -0.123: #YesNoFormat(-0.123)#<BR> 0: #YesNoFormat(0)#<BR> 0.123: #YesNoFormat(0.123)#<BR> 1: #YesNoFormat(1)#<BR> 1.123: #YesNoFormat(1.123)#<BR> True: #YesNoFormat(True)#<BR> False: #YesNoFormat(False)# </CFOUTPUT>
Get Programming ColdFusion now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.