>>The point is that query.recordcount is not a boolean

May I recall that CF is a typeless language.
There are no such things like boolean as such, nor integers nor reals 
actually.
Since CFML is a kind of layer above HTML, everything is more or less stored
and treated as strings first.
Only at execution, depending on the type of expression and the type of 
arguments
implied by the expression or statement, the correct value is interpreted 
from the argument.
For instance : in <CFSET test = "yes">, is test a boolean? No, it's a 
string.
in <CFIF test>, test must be treated as a boolean because of the CFIF 
statement,
then anything like "yes", or any integer value != 0 will be translated 
to true.

By the way, constructs like if (variable) historically originated from 
the C language,
(may be even before in Pascl or Algol), and even if C is a strongly 
typed language,
implicit casting is used, and "if(variable)" is currently used, variable 
being a boolean or not.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:254994
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to