Railo tip: multiple assignments in one

While waiting for CF.Objective() to begin, I am doing some relaxed coding with Micha in the lobby of our hotel. It's great to be talking about and working on Railo with the main man :-)

Anyway, a new Railo tip:

<cfscript>
paul = micha = new Person();
paul.name = 'Paul';
micha.name = 'Micha';
dump(variables);
</cfscript>

See the highlighted part? You can do multiple assignments in one statement!

It also works in regular CFML off course:

<cfset paul = micha = new Person() />

 

del.icio.us Digg StumbleUpon Facebook Technorati Fav reddit Google Bookmarks
| Viewed 4820 times

No comments yet.

(will not be published)
Leave this field empty