wel, it's not really allaire's fault. from an implementation standpoint,
you shouldn't "need" to search for something within an array.
an array should be indexed by some contiguous set of indices, and is usually
used for storing information related to those indices. it allows random
access to those elements, but you most likely want to do something to "all"
those elements (even if it is to just examine its value).
lists are a non-random access version of arrays. when you say "give me list
element 5", CF has to look at elements 1-4 ("traverse" them) to get to
element 5. not optimal, but useful in its own context. since you have to
"look" at each one, a search makes more sense.
structures are a truly random access way to organize data. you CANNOT
simply traverse a structure, as there is (generally) no way to go from
struct[1] to struct[n] in an ordered manner. that is also why there is a
"search".
this is only from a programming theory standpoint.
Chris Olive,
DOEHRS Website Administrator
-----Original Message-----
From: Andy Ewings [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 03, 2000 10:58 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Finding an element in an array
Yeh thought so......thanks for confirming. Bit naff don;t you think?....why
haven't allaire supported this for arrays but have for Structs and Lists?
-----Original Message-----
From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]]
Sent: 03 August 2000 15:43
To: [EMAIL PROTECTED]
Subject: RE: Finding an element in an array
> Can anyone tell me if it is at all possible to get CF to find an
> element in
> an array?
> I know you use ListFind and StructFind for lists and structures
> respectively
> but don;t know how to do it with an array.
>
> I have a 2-dimensional array so can't use the ArrayToList
> function and then
> do a ListFind...is this correct? what happens if you try to convert a
> multidimensional array into a list?
You're gonna have to do it the hard way - loop through the array and check
each line
Philip Arnold
ASP Multimedia Limited
T: +44 (0)20 8680 1133
"Websites for the real world"
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
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.
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
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.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
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.