Skip to main content
Inspiring
October 30, 2012
Answered

dynamic array

  • October 30, 2012
  • 2 replies
  • 3569 views

I just wanted to know does Colfusion support dynamic array?

Do I need to know how many rows of data to store data in advance or we can create as program needed?

How many dimensions array ColdFustion support?

Thanks again for helping and information,

regards,

Iccsi,

    This topic has been closed for replies.
    Correct answer Carl Von Stetten

    iccsi,

    The answers to your questions can be found here: http://help.adobe.com/en_US/ColdFusion/10.0/Developing/WSc3ff6d0ea77859461172e0811cbec09f0b-7ffc.html.

    -Carl V.

    2 replies

    BKBK
    Community Expert
    Community Expert
    October 30, 2012

    iccsi wrote:

    I just wanted to know does Colfusion support dynamic array?

    Do I need to know how many rows of data to store data in advance or we can create as program needed?

    You can dynamically store as many as you like. In the following code, the array elements a[2], a[3], a[4], a[6] are undefined. Hence the need to first initialize an array using arraySet().

    a = arrayNew(1);

    a[1]="str a";

    a[5]="str e";

    a[7]="str g";

    How many dimensions array ColdFustion support?

    3

    Inspiring
    October 30, 2012

    How many dimensions array ColdFustion support?

    3

    arrayNew() supports a max of three dimensons.  ColdFusion itself kinda supports any number of dimensions, with the caveat that it doesn't support true multidimension arrays at all, it merely supports arrays of arrays.

    I discuss ColdFusion's array support fairly thoroughly on my blog: http://adamcameroncoldfusion.blogspot.co.uk/search/label/Arrays. Best read in chronological order.

    --

    Adam

    iccsiAuthor
    Inspiring
    October 30, 2012

    Thanks a million for helping and information,

    Regards,

    Iccsi,

    Carl Von Stetten
    Carl Von StettenCorrect answer
    Legend
    October 30, 2012