Implicit Structure Notation ColdFusion

coldfusion

Implicit Structure Notation was added to ColdFusion 8, this allows you to create a struct on the fly in one line.

Here's a simple example of how the new short hand notation works:

<cfset person = { firstname="Pete", lastname="Freitag" }>

In Prior versions we might have done something like this, which is equivalent to the above code:

<cfset person = StructNew()>
<cfset person.firstname = "Pete">
<cfset person.lastname = "Freitag">

As you can see the new shortcut notation is very handy!


cfobjective pre-conf training

Related Entries

This entry was:

WAF for CF

Trackbacks

Trackback Address: 729/A04F5ECEF858FAADB7BD0ABE353C7DB1

Post a Comment




  



Spell Checker by Foundeo

Recent Entries





Basecamp
pfreitag on twitter