expected ',' before '*' token

Arduino: 1.8.4 (Windows Store 1.8.8.0) (Windows 10), Board: “Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)”

C:\Users\Steven E Marshall\Documents\ITEADLIB_Arduino_Nextion-master\sketch_sep07a\sketch_sep07a\sketch_sep07a.ino: In function ‘void loop()’:

sketch_sep07a:25: error: expected ‘,’ before ‘*’ token

I04_C = [x5 * vdc1 ^ 5] - [x4 * vdc1 ^ 4] + [x3 * vdc1 ^ 3] - [x2 * vdc1 ^ 2] + [x1 * vdc1] - x0;

^

sketch_sep07a:25: error: expected identifier before ‘*’ token

C:\Users\Steven E Marshall\Documents\ITEADLIB_Arduino_Nextion-master\sketch_sep07a\sketch_sep07a\sketch_sep07a.ino: In lambda function:

sketch_sep07a:25: error: expected ‘{’ before ‘-’ token

I04_C = [x5 * vdc1 ^ 5] - [x4 * vdc1 ^ 4] + [x3 * vdc1 ^ 3] - [x2 * vdc1 ^ 2] + [x1 * vdc1] - x0;

^

C:\Users\Steven E Marshall\Documents\ITEADLIB_Arduino_Nextion-master\sketch_sep07a\sketch_sep07a\sketch_sep07a.ino: In function ‘void loop()’:

sketch_sep07a:25: error: expected ‘,’ before ‘*’ token

I04_C = [x5 * vdc1 ^ 5] - [x4 * vdc1 ^ 4] + [x3 * vdc1 ^ 3] - [x2 * vdc1 ^ 2] + [x1 * vdc1] - x0;

^

sketch_sep07a:25: error: expected identifier before ‘*’ token

C:\Users\Steven E Marshall\Documents\ITEADLIB_Arduino_Nextion-master\sketch_sep07a\sketch_sep07a\sketch_sep07a.ino: In lambda function:

sketch_sep07a:25: error: expected ‘{’ before ‘+’ token

I04_C = [x5 * vdc1 ^ 5] - [x4 * vdc1 ^ 4] + [x3 * vdc1 ^ 3] - [x2 * vdc1 ^ 2] + [x1 * vdc1] - x0;

^

C:\Users\Steven E Marshall\Documents\ITEADLIB_Arduino_Nextion-master\sketch_sep07a\sketch_sep07a\sketch_sep07a.ino: In function ‘void loop()’:

sketch_sep07a:25: error: no match for ‘operator-’ (operand types are ‘loop()::<lambda()>’ and ‘loop()::<lambda()>’)

I04_C = [x5 * vdc1 ^ 5] - [x4 * vdc1 ^ 4] + [x3 * vdc1 ^ 3] - [x2 * vdc1 ^ 2] + [x1 * vdc1] - x0;

^

sketch_sep07a:25: error: expected ‘,’ before ‘*’ token

I04_C = [x5 * vdc1 ^ 5] - [x4 * vdc1 ^ 4] + [x3 * vdc1 ^ 3] - [x2 * vdc1 ^ 2] + [x1 * vdc1] - x0;

^

sketch_sep07a:25: error: expected identifier before ‘*’ token

C:\Users\Steven E Marshall\Documents\ITEADLIB_Arduino_Nextion-master\sketch_sep07a\sketch_sep07a\sketch_sep07a.ino: In lambda function:

sketch_sep07a:25: error: expected ‘{’ before ‘-’ token

I04_C = [x5 * vdc1 ^ 5] - [x4 * vdc1 ^ 4] + [x3 * vdc1 ^ 3] - [x2 * vdc1 ^ 2] + [x1 * vdc1] - x0;

^

C:\Users\Steven E Marshall\Documents\ITEADLIB_Arduino_Nextion-master\sketch_sep07a\sketch_sep07a\sketch_sep07a.ino: In function ‘void loop()’:

sketch_sep07a:25: error: expected ‘,’ before ‘*’ token

I04_C = [x5 * vdc1 ^ 5] - [x4 * vdc1 ^ 4] + [x3 * vdc1 ^ 3] - [x2 * vdc1 ^ 2] + [x1 * vdc1] - x0;

^

C:\Users\Steven E Marshall\Documents\ITEADLIB_Arduino_Nextion-master\sketch_sep07a\sketch_sep07a\sketch_sep07a.ino: In function ‘void loop()’:

sketch_sep07a:25: error: expected ‘,’ before ‘*’ token

I04_C = [x5 * vdc1 ^ 5] - [x4 * vdc1 ^ 4] + [x3 * vdc1 ^ 3] - [x2 * vdc1 ^ 2] + [x1 * vdc1] - x0;

^

sketch_sep07a:25: error: expected identifier before ‘*’ token

C:\Users\Steven E Marshall\Documents\ITEADLIB_Arduino_Nextion-master\sketch_sep07a\sketch_sep07a\sketch_sep07a.ino: In lambda function:

sketch_sep07a:25: error: expected ‘{’ before ‘-’ token

I04_C = [x5 * vdc1 ^ 5] - [x4 * vdc1 ^ 4] + [x3 * vdc1 ^ 3] - [x2 * vdc1 ^ 2] + [x1 * vdc1] - x0;

^

C:\Users\Steven E Marshall\Documents\ITEADLIB_Arduino_Nextion-master\sketch_sep07a\sketch_sep07a\sketch_sep07a.ino: In function ‘void loop()’:

sketch_sep07a:29: error: expected ‘}’ at end of input

}

^

exit status 1
expected ‘,’ before ‘*’ token

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.

On errors like these, usually the error is a few lines back.

Post the complete sketch, and use the </> icon.

Jacques

Somebody needs to take a tutorial on basic c expression syntax. [] are NOT used for grouping expressions....

Regards, Ray L.

Hi, Welcome to the forum.

Please read the first post in any forum entitled how to use this forum. http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code. It will be formatted in a scrolling window that makes it easier to read.

Thanks.. Tom.. :)

[] are for array subscripting, () are for expression grouping.

Not only that, but '^' ain't exponentiation.

KeithRB: [] are for array subscripting, () are for expression grouping.

Not only that, but '^' ain't exponentiation.

To put it another way, OP: please google "C++ tutorial" and lear the basics of the C++ programming language. You cannot copy-paste MATLAB or Perl into a sketch and expect the gcc compiler to understand it.