Constant Array Question
Raphayo
Posts: 111
Hi All,
I love using Constant Array it save me time in code logic but i have a question for you folk.
I'm using integer constant array this way
work perfectly has i know,
but i want to do the same thing with string constant
It is possible? Right now if i'm using Debug to see my array, it's empty
I need to do my array this way, to be able to see it in Debugger.
Thanks all for your help.
I love using Constant Array it save me time in code logic but i have a question for you folk.
I'm using integer constant array this way
TP_SRC1 = 21 TP_SRC2 = 22 TP_SRC3 = 23 TP_SRC4 = 24 TP_SRC5 = 25 TP_SRC6 = 26 integer TP_SRC_LIST[]={ TP_SRC1,TP_SRC2,TP_SRC3,TP_SRC4,TP_SRC5,TP_SRC6}
work perfectly has i know,
but i want to do the same thing with string constant
char cExtronUSB1[2] = {'1^'} char cExtronUSB2[2] = {'2^'} char cExtronUSB3[2] = {'3^'} char cExtronUSB4[2] = {'4^'} char cExtronUSB0[2] = {'0^'} char cExtronUSB_List[][2]={ // String to send cExtronUSB1, cExtronUSB0, cExtronUSB0, cExtronUSB2, cExtronUSB3, cExtronUSB0}
It is possible? Right now if i'm using Debug to see my array, it's empty
I need to do my array this way, to be able to see it in Debugger.
char cExtronUSB_List[][2]={ // String to send {'1^'}, {'0^'}, {'0^'}, {'2^'}, {'3^'}, {'0^'}}
Thanks all for your help.
0
Comments
Where are you doing your assignment? I do them in define_start. You also have to make sure that length_array returns what you think it should return. If length_array returns 0 you will have to use set_length_array.
I don't assign commands into arrays this way.
I do it this way instead:
Paul