Archive for June 1st, 2007

ListToArray with empty elements

Recently there was a request on our forum to support empty elements in ListToArray function for Scorpio i.e ColdFusion 8. it might not be done in Scorpio since it is too late to add a new function. However it can be very easily achieved in cfm itself. Here is the code to do it.

<cfset cflist="a,b,,c,,,d">
<cfset cfarr1 = ListToArray(cflist)>
 
<span style="text-decoration: line-through;"><cfset cfarr2 = cflist.split(",")></span>
<cfset cfarr2 = cflist.split(",", -1)>
 
<cfdump var="#cfarr1#">
<cfdump var="#cfarr2#">
 
<cfscript>
for(i=1; i <= ArrayLen(cfarr2); i++)
{
 writeoutput("Element #i# : #cfarr2[i]# <br>");
}
</cfscript>

As you can see, 3rd, 5th and 6th element in this cfarr2 are empty.

ColdFusion 8 beta has arrived

I think I am the last person to say that ColdFusion 8 i.e Scorpio beta is out. Yayyy !!! :)

And that means I am back on blogsphere after a long hiatus. Seriosuly, what a fabulous journey it has been! It is a result of nearly one and half year of hard work, huge amount of research, so many design discussions, fights over nitties-gritties of features, many spec review meetings (which many a times reminded me of the college time ragging or soap box for elections at IIT kgp), many beer parties (because some one was beer boy coz he broke the build) and eating rubber chicken few times (becoz the build was broken again !!) etc etc etc.. — all to ensure that there is enough sting in the Scorpio. :)

Everyone of us in the team is really proud of the stuff that we have built and I am sure people gonna love it.

And we are not done yet! Ashwin’s cartoon says it all !!!