Implicit Structure Notation ColdFusion
January 13, 2009
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!
Permalink | Add Comment |
add to del.icio.us
| Tags: cfml, coldfusion 8, coldfusion, notation, struct, structure, implicit
add to del.icio.us
| Tags: cfml, coldfusion 8, coldfusion, notation, struct, structure, implicit
Related Entries
- 10 Most Useful Image Functions in ColdFusion 8 - April 5, 2008
- CFImage Effects Library for ColdFusion 8 - August 9, 2007
- CFThread - Don't Abuse It - August 7, 2007
- Serializing CFC's in ColdFusion 8 - August 6, 2007
- Hands on ColdFusion Security Training - February 4, 2010







