Page 1 of 1

Populating Boolean variables

PostPosted: 21 Feb 2013, 22:07
by Ursego
If it's possible, populate Boolean variables with results of Boolean expressions instead of direct assigning of true and false.

*** BAD code: ***

Code: Select all
if (rowCount > 1)
   multiRowsMode = true;
else
   multiRowsMode = false;

*** GOOD code: ***

Code: Select all
multiRowsMode = (rowCount > 1);