Very nice. I thought my function was terse. bravo!

G!

>
> <cfscript>
> // assumes ACF9 / Railo 3.2:
> timeStart = getTickCount();
> for ( a = 1; a <= iter; ++a ) {
>    found = {};
>    fields = listToArray( form.fieldNames );
>    for ( f in fields ) {
>        v = form[f];
>        if ( structKeyExists( found, v ) ) {
>            // logic to handle a duplicate
>        } else {
>            found[v] = true;
>        }
>    }
> }
> writeOutput( 'structKeyExists: ' & ( getTickCount() - timeStart ) & '<br
> />' );
> </cfscript>
> --
> Sean A Corfield -- (904) 302-SEAN
> Railo Technologies, Inc. -- http://getrailo.com/
> An Architect's View -- http://corfield.org/
>
> "If you're not annoying somebody, you're not really alive."
> -- Margaret Atwood
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338223
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to