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.

MSP430FR2355: ternary operator question

Part Number: MSP430FR2355

I continue to get an error trying to compile this or even something simple....Can someone tell me what I am doing wrong (usually I use if conditions but decided to try ternary)

Fullscreen
1
((uint8_t)((float)clkSpeed / smClkDiv) % 4) == 0 ? error = error : error = 1;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

No matter what I try I get


Fullscreen
1
2
Description Resource Path Location Type
#138 expression must be a modifiable lvalue systemComms.c /systemComms line 30 C/C++ Problem
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

**Attention** This is a public forum