Scott Steinbeck
04/14/2023, 12:34 AMvalue = 0;
value == 'false' //true
this is ending up matching as a falsey valuebdw429s
04/14/2023, 12:35 AMScott Steinbeck
04/14/2023, 12:37 AMmbh
04/14/2023, 12:49 AMIsFalseString = IIF( IsSimpleValue( InputString ) && !IsNumeric( inputString ) && InputString EQ targetString,DE( true ),DE( false ) );jakobward
04/14/2023, 1:34 AMmbh
04/14/2023, 1:37 AMbdw429s
04/14/2023, 3:59 AMis that not a bug?@Scott Steinbeck No, CFML has always treated 0 as falsey and all other integers as truthy.
bdw429s
04/14/2023, 3:59 AMcompareNoCase()Scott Steinbeck
04/14/2023, 4:00 AMbdw429s
04/14/2023, 4:00 AMbdw429s
04/14/2023, 4:01 AMbdw429s
04/14/2023, 4:01 AMbdw429s
04/14/2023, 4:02 AM"2" + "3" // 5
works in CFMLbdw429s
04/14/2023, 4:02 AMScott Steinbeck
04/14/2023, 4:04 AMbdw429s
04/14/2023, 4:05 AMbdw429s
04/14/2023, 4:05 AMisBoolean( 'false' )
and
isBoolean( false )
return true!bdw429s
04/14/2023, 4:06 AMScott Steinbeck
04/14/2023, 4:06 AMbdw429s
04/14/2023, 4:06 AMbdw429s
04/14/2023, 4:07 AMbdw429s
04/14/2023, 4:10 AMbdw429s
04/14/2023, 4:12 AMScott Steinbeck
04/14/2023, 4:12 AMbdw429s
04/14/2023, 4:12 AMbdw429s
04/14/2023, 4:13 AMcompare() or compareNoCase(). That's how CF works. All other == or EQ operators will use the class above which will allow for any loose typing match it can find.Scott Steinbeck
04/14/2023, 4:18 AMbdw429s
04/14/2023, 4:19 AM=== but it's dumb (does a strict == check in Java) and everyone who uses it, does so on accident, lolbdw429s
04/14/2023, 4:19 AM=== like JS so Lucee 6 will FINALLY match itbdw429s
04/14/2023, 4:20 AMScott Steinbeck
04/14/2023, 4:22 AMbdw429s
04/14/2023, 4:22 AMbdw429s
04/14/2023, 4:23 AMbdw429s
04/14/2023, 4:24 AMScott Steinbeck
04/14/2023, 4:25 AMbdw429s
04/14/2023, 4:25 AMif( mySetting === true )
as though they've done the world some favor by being more pedantic in what they accept 🙂Dave Merrill
04/14/2023, 3:31 PMbdw429s
04/14/2023, 4:11 PMbkbk
04/23/2023, 2:05 PM