This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: TI C/C++ Compiler
I am getting a #138 expression must be a modifiable lvalue error. I have pared it down to this code snippet. I suspect I will be a little embarrassed when I find out what the problem is.
All of the Populate Array statements have this error. i am using CCS 9.3.0.00012 with compiler TI v20.2.1.LTS
Thanks for you patience and help.
// Declare Array
float Data1_Dat [5][5];
int main(void)
{
// Define array
float Data1_Dat[0][0];
//Populate array
Data1_Dat[0,0] = 1.0;
Data1_Dat[1,1] = 2.0;
Data1_Dat[2,2] = 3.0;
Data1_Dat[3,3] = 4.0;
Data1_Dat[4.4] = 5.0;
return 0;
}
Look how you defined it. The proper syntax is Data1_Dat[1][1] = 42.0;
Also, here is a case of wrong comments. You defined *2* Data1_Dat arrays: one global and one local to main(). I believe that one local to main() will be used.