foundeo
Adobe recommends that you use the Floor function, instead of the Int function, in all new applications. https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-functions/functions-in-k/int.html ? Is there an actual reason or just that there are two functions doing the same thing?foundeo
foundeo
bdw429s
02/10/2023, 8:05 PMfoundeo
bdw429s
02/10/2023, 8:12 PMbdw429s
02/10/2023, 8:13 PMfoundeo
Michael Gillespie
02/10/2023, 8:27 PMfoundeo
websolete
02/10/2023, 8:28 PMfix() wasn't itfoundeo
websolete
02/10/2023, 8:34 PMwebsolete
02/10/2023, 8:34 PMMichael Gillespie
02/10/2023, 8:34 PMbdw429s
02/10/2023, 8:35 PMfloor() is NOT the same as int(val())
CFSCRIPT-REPL: int(val('3.5sdf'))
3
CFSCRIPT-REPL: floor('3.5sdf')
ERROR
can't cast [3.5sdf] string to a number valuebdw429s
02/10/2023, 8:35 PMval() is a string function really, not a numeric one.Michael Gillespie
02/10/2023, 8:39 PMMichael Gillespie
02/10/2023, 8:40 PM<cfset x=int(val('10.5'))>
<cfset y=int(val('10.5xx'))>
<cfoutput>#x# - #y#</cfoutput>
10 - 10bdw429s
02/10/2023, 8:46 PMbdw429s
02/10/2023, 8:46 PMbdw429s
02/10/2023, 8:47 PMMichael Gillespie
02/10/2023, 8:48 PM<cfset z=int(val('xx'))>Michael Gillespie
02/10/2023, 8:50 PMbockensm
02/10/2023, 10:39 PM