I find that the list functions in CFML are often underutilized or ignored by programmers, often because they come from other worlds like ASP where 1) they traditionally had to write their own stuff to parse strings and/or 2) they often don't pause to consider that the string they are working on could really be considered a list in the first place.

Your city, state zip-plus4 is a plethora of lists (thank you for letting me use that word). First, it's a comma-delimited list. Break that apart and you then have some space-delimited lists, Break it apart again and your zip is potentially a hyphen-delimited list. At any point in this work, if one of your lists has the wrong number of elements (ListLen), it's an input validation issue. When you use CFML's listLen, listFirst, listGetAt and listLast on all these, you don't even have to account for - or remove those delimiters yourself (i.e. all that "length -1" stuff I'd have to write before).

I both love your enthusiasm and agree with Matt. Sometimes you just have to wait until you can play directly with the engine and see what happens. I often get my best inspiration only after seeing the processed results of my last.

Alan K Holden

--
Open BlueDragon Public Mailing List
http://www.openbluedragon.org/   http://twitter.com/OpenBlueDragon
mailing list - http://groups.google.com/group/openbd?hl=en

!! save a network - please trim replies before posting !!

Reply via email to