• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Name

Duplicate

Synopsis

                   Duplicate(variable)

Creates a duplicate copy of variable without any references to the original. variable can be any ColdFusion datatype with the exception of component objects (COM, CORBA, and Java). Duplicate( ) overcomes problems associated with copying structures and queries. Generally, when copying a structure or query, any future change to the original object results in a change to the copy. Duplicate( ) eliminates this by making an independent copy of the original object. The duplicate copy isn’t affected by changes to the original. The Duplicate( ) function is especially useful for copying nested structures and XML objects, and should be used in place of the StructCopy( ) function. The following example illustrates the difference between copying and duplicating query objects:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint