Hmmm, 

Dave, if this is the case (which I don't doubt), then why will this work:

<cfset first_list="apple,banana,pomegranite,kiwi fruit,ocelot"><!--- comma
delimiter --->
<cfoutput>#first_list#</cfoutput><br>

<cfset new_list = listchangedelims(first_list, ", ")><!--- comma space
delimter --->
<cfoutput>#new_list#</cfoutput>

Granted if you perform a listgetat on the new_list with delims as ", " eg:
<cfset kiwivar = listgetat(new_list, 4, ", ")>
it will only pick up 'kiwi' and not 'kiwi fruit' as it uses the space as an
optional delimiter rather than space comma, but isn't it odd that the change
delims works?



-------------------------------------------------------
Rich Wild
Senior Web Designer

-------------------------------------------------------
e-mango.com ltd                      Tel: 01202 587 400
Lansdowne Place                      Fax: 01202 587 401
17 Holdenhurst Road
Bournemouth                   Mailto:[EMAIL PROTECTED]
BH8 8EW, UK                      http://www.e-mango.com
-------------------------------------------------------
This message may contain information which is legally
privileged and/or confidential.  If you are not the
intended recipient, you are hereby notified that any
unauthorised disclosure, copying, distribution or use
of this information is strictly prohibited. Such
notification notwithstanding, any comments, opinions,
information or conclusions expressed in this message
are those of the originator, not of e-mango.com ltd,
unless otherwise explicitly and independently indicated
by an authorised representative of e-mango.com ltd.
-------------------------------------------------------




> -----Original Message-----
> From: Dave Watts [mailto:[EMAIL PROTECTED]]
> Sent: 12 December 2000 20:08
> To: CF-Talk
> Subject: RE: List w/" " delims
> 
> 
> > For the record:
> > You can use more than one symbol for a list delimiter if you 
> > assign it to a variable first:
> > 
> > <cfset delim = "||*||">
> > <cfloop list="#list#" delimiter="#delim#".....
> > 
> > Don't ask why, it just works that way
> 
> This really depends on what you mean by "using more than one 
> symbol for a
> list delimiter".
> 
> If you mean that you can use a multi-character string as a 
> list delimiter,
> this is not the case. 
> 
> If, on the other hand, you mean that you can specify multiple 
> characters,
> any one of which may be used as a delimiter, you don't need 
> to assign those
> characters to a variable first. 
> 
> Here's a code sample that demonstrates both of these points. 
> Both CFLOOPs
> will output the same thing - the numbers 1 through 4 on four 
> separate lines.
> If you could specify a multi-character delimiter, one or both 
> CFLOOPs would
> output "1:2" on the first line, then "3:4" on the second 
> line. If assigining
> the characters to a variable first made a difference, the 
> first one would
> output the numbers on four lines, and the second one would 
> output two on
> each line.
> 
> <cfset demolist = "1:2:;3;4">
> 
> <cfloop list="#demolist#" index="i" delimiters=":;">
> <cfoutput>#i#</cfoutput><br>
> </cfloop>
> 
> <br>
> 
> <cfset mydelims = ":;">
> 
> <cfloop list="#demolist#" index="i" delimiters="#mydelims#">
> <cfoutput>#i#</cfoutput><br>
> </cfloop>
> 
> Dave Watts, CTO, Fig Leaf Software
> http://www.figleaf.com/
> voice: (202) 797-5496
> fax: (202) 797-5444
> 
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        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