• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

6. Complex Datatypes > 6.2. Arrays

Arrays

An array is an object that stores indexed values. Each value stored in an array is referred to as an element of the array. Each element has an integer assigned to it that marks its position within the array. This number is referred to as the element’s index. Arrays elements can store any ColdFusion datatype including additional arrays.

As previously discussed, ColdFusion supports one-dimensional (think of this as a single column of data or a list), two-dimensional (think of this as a spreadsheet with rows and columns), and three-dimensional (think of this as a cube of data) arrays. Additional dimensions can be created dynamically by nesting multidimensional arrays (creating an array of arrays). ColdFusion arrays differ slightly from traditional arrays found in other programming languages. Whereas traditional arrays are fixed in size, ColdFusion arrays are dynamic. This means that a ColdFusion array can expand or contract as elements are added and removed from the array.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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