0

I came across following if statement which confused me. This is the output of an autogenerated .c file and compiles.

example 1:

 while ( ( rvs_tmp_k_363=0,  
           RVS_DM(363,
                  &rvs_tmp_k_363,
                  (unsigned int)(Idx < (uint16*)&nvHist_QData[0x00FF])
                  )
         )
       )

example 2.

if ( ( rvs_tmp_k_362=0,
       RVS_DM(362,
              &rvs_tmp_k_362,
              (unsigned int)(RVS_CM(&rvs_tmp_k_362,
                                    2,
                                   (unsigned int)((nvHist_Queue.DataPtr != (uint8*)&nvHist_QData))
                            )
Yunnosch
  • 24,749
  • 9
  • 40
  • 51
user2927392
  • 257
  • 3
  • 11
  • It assigns the variable, executes the function call, and tests the result ofthe call. – Barmar Apr 21 '18 at 08:06
  • 1
    It's not really necessary for the `if`, you can just put the assignment before it. It's useful in `while` if the loop reassigns the variable and you want to reset it every time. – Barmar Apr 21 '18 at 08:07

0 Answers0