As a general rule, arrays are more efficient than lists.
Lists are implemented as strings, so every action on them is 
done as string processing.  Arrays are implemented natively.

  Based on that (Without actually looking anything up) the string
'1' is contained in foolist, right between a comma and a zero.


"Park, Simon" wrote:
> 
> Why does the following always return TRUE?
> 
> <CFSET FooList = "6,7,8,9,10">
> <CFIF ListContains(VARIABLES.FooList, "1")>
> TRUE
> <CFELSE>
> FALSE
> </CFIF>
> 
> Do I need to put the values into an array?
> 
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Simon Park              Computer Systems Management, Inc.
> Ph: 703-823-4300 x119   205 South Whiting Street #201
> fax: 703-823-4301       Alexandria, VA  22304
>              http://www.csmi.com
> 
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to