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

Arrays

Arrays are a type of data structure used to store information, and they are common to almost all programming languages. Like lists, arrays can be used to store multiple values as a single variable. Instead of being stored in a simple string, however, ColdFusion stores arrays in memory as something called complex data. Additionally, whereas lists are only capable of storing simple values like strings and numbers, arrays are able to store complex data like queries, structures, and even other arrays.

Because arrays are stored in memory, access to information stored in an array is usually quicker than parsing through a list to find a value. Arrays also come in one, two, or three dimensions. These dimensions determine how many storage areas are available. Let’s take a look at a simple one-dimensional array.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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