Home AMX User Forum NetLinx Studio

Multi-Dimensional Constant Declaration

Is this a valid way to declare multi-dimensional array?

    DEFINE_DEVICE
    dvDev01_1 = 2001:1:1
    dvDev02_1 = 2002:1:1
    dvDev03_1 = 2003:1:1

    dvDev04_2 = 2004:1:2
    dvDev05_2 = 2005:1:2
    dvDev06_2 = 2006:1:2

    DEFINE_CONSTANT
    volatile dev dvDev1[3] =
        {
            dvDev01_1,
            dvDev02_1,
            dvDev03_1
        }

    volatile dev dvDev2[3] =
        {
            dvDev04_2,
            dvDev05_2,
            dvDev06_2
        }

   volatile dev dvDevALL[2][] =
        {                         
            dvDev1,               
            dvDev2                
        }                         

Comments

  • John NagyJohn Nagy Posts: 1,734

    Two quick things to try before asking: Does it compile, and if so, Does it work as you intend.

  • It does compile. My current array is big and i can't seem to debug it. Current size is [6][24]. Its for 6 DGX 1600. I want to create levels to track the outputs. 24 because of the additional 8 outputs of the audio card.
    When i try to do a create_level at define_start against it. I get errors.
    That's why the question on this forum.

  • SCamphaugSCamphaug Posts: 23

    Does it have to be an array or could it be dismantled a bit better using Device, Port, System to populate the levels based on the calling device or port numbers?

  • guess i'll just create level events.

Sign In or Register to comment.