String array problem
Posted: Fri May 12, 2017 10:02 am
Hi Leigh, Ben,
working with dsPic miac and I have come across a problem in trying to use string arrays – see attached
I'm trying to set up a 5 x 20 character text matrix for later recall in a dynamic menu navigation display.
I am using
The variable can be set up without any errors – however when I'm trying to write to the individual location on the matrix for example mysting[2]="test" it appears to default to mystring[0] – as you are stepping through my program example have a look at the value in the simulation debugger window – it always of defaults to 0 position
I have checked the functionality against the standard byte[x][x] syntax and that appears to function okay
I've also check this on the hardware – the problem is not limited to simulation – hardware exhibits the same result
is this a bug or do I not have the syntax correct?
by the way – loving the simulation console functionality!
Thanks for your assistance.
All the best,
Pete
working with dsPic miac and I have come across a problem in trying to use string arrays – see attached
I'm trying to set up a 5 x 20 character text matrix for later recall in a dynamic menu navigation display.
I am using
Code: Select all
mystring[5][20]
I have checked the functionality against the standard byte[x][x] syntax and that appears to function okay
I've also check this on the hardware – the problem is not limited to simulation – hardware exhibits the same result
is this a bug or do I not have the syntax correct?
by the way – loving the simulation console functionality!

Thanks for your assistance.
All the best,
Pete