What you really want is ListFind(Variables.FooList, "1")
List Contains looks at each element of a list, and then checks that element
to see if the substring is somewhere within. As such, list element 5 in
foolist, which is 10, does contain the substring 1.... and the function
returns 5.
ListFind looks at each element of a list and checks to see if that element
value is equal to a substring. Since your list does not contain a whole
element of 1, the result is 0, or False.
> -----Original Message-----
> From: Jeffry Houser [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 01, 2000 9:12 AM
> To: CF-Talk
> Subject: Re: ListContains wierdness - why?
>
>
>
> 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:
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists