If you're not worried about the number being negative:

<cfif data gte 2000>
  <cfset words = "large">
<cfelseif data gte 1000>
  <cfset words = "medium">
<cfelse>
  <cfset words = "small">
</cfif>

Jim


-----Original Message-----
From: Olson, Kelly <[EMAIL PROTECTED]>
To: CF-Talk <[EMAIL PROTECTED]>
Date: Sunday, September 24, 2000 1:50 PM
Subject: Newbie" CFIF for range of data


>How would you write a conditional statement like this:
>
><CFIF data is greater than 0 and less that 1000>
>    <CFSET words="small">
><CFELSE IF data is greater than 1000 and less than 2000>
>    <CFSET words="medium">
><CFELSE>
>    <CFSET words="large">
></CFIF>
>
>
>All of the examples seem to only show an "IS" value. not  "IS" range.
>
>Kelly

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to