This will not work all the time though will it? You will never get rid of
evaluate altogether?
Not altogether, but it is used much more often then necessary. The only
occurrence I have not been able to eliminate it from is something like this.
<cfset lowValue = 5>
<cfset lowInclusive = true>
<cfset hiValue = 10>
<cfset hiInclusive = false>
<cfparam name="url.valueToCheck" default="7">
<cfset compareString = "">
<cfif lowInclusive>
<cfset compareString = lowValue & " LTE " & valueToCheck>
<cfelse>
<cfset compareString = lowValue & " LT " & valueToCheck>
</cfif>
<cfset compareString = compareString & " AND ">
<cfif hiInclusive>
<cfset compareString = compareString & hiValue & " GTE " & valueToCheck>
<cfelse>
<cfset compareString = compareString & hiValue & " GT " & valueToCheck>
</cfif>
<cfoutput>
#evaluate(compareSTring)#
</cfoutput>
--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA
---------
| 1 | |
--------- Binary Soduko
| | |
---------
"C code. C code run. Run code run. Please!"
- Cynthia Dunning
Confidentiality Notice: This message including any
attachments is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the
intended recipient, please contact the sender and
delete any copies of this message.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:247682
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4