0

When I am trying to generate C code with Embedded Coder, the following condition

if (~Input)

is converted to the following ugly condition

if ((boolean_T)((int32_T)((Input ? ((int32_T)1) : ((int32_T)0)) ^ 1))) {

Is there any option to change in the setting to avoid this type of code being generated? Is there a good reason why this code would be generated instead of a simpler alternative?

The same code is generated if I change the condition to:

if (false == Input)
Mike
  • 1

0 Answers0