Well, it will return the actual recordcount... which is a number.  But
CF implicitly converts numeric values to boolean values. Any non-zero
value is true, while any zero value is false.

So given the following code:

<cfif myCFC.myMethod()>do something</cfif>

... assuming myMethod returns a numeric value, your page will output
"do something" as long as the value returned is not zero.

On Wed, Jan 26, 2011 at 12:02 PM, Che Vilnonis <ch...@asitv.com> wrote:
>
> Charlie, is this true only when the return type is "Boolean"?
> Otherwise, it should return the actual recordcount, right?
>
> Thanks, Che
>
>
>
>
> You could also drop the comparison itself since CF does implicit boolean
> conversion.
>
> <cfreturn isStudentEmployee.recordcount />
>
> ^That'll do the same thing.
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:341419
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to