So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By MikeyK
#74731 Hi,
I'm new here so sorry if this is in the wrong area, or a really simple question.
I've been looking at Arduino and WeMos projects for a while and finally started with a project.

What do the || (two concatinate signs) mean in the if statement below?
I've been reading through documentation on 'if' syntax but I can't find anything about || in an if statement.

if( total_tank_levels == NUM_MINMAX_TANK_LEVELS || reset_min_max_levels ) {
unsigned short min_level = 65535, max_level = 0, changed = 0;
for( i = 0; i < NUM_MINMAX_TANK_LEVELS; ++i ) {
if( last_tank_levels[i] < min_level )
min_level = last_tank_levels[i];
if( last_tank_levels[i] > max_level )
max_level = last_tank_levels[i];

Cheers,
Michael