Or probably the code was left here in this state to eventually expand things when needed.
as example if I would act differently, maybe printing something as error or warning, the code with the if clause is more “extensible” to make such sort of things.
Doesn’t matter, it’s the same because (status == 0 && token == UNIT) will always return either true or false, instead of an if statement to choose which to return you can just do return status == 0 && token == UNIT
Ah ok, it is similar to write in python (I have copied the condition as in C++, in Python probably is slightly different, I have to check the subtle boolean AND and OR writings of Python)
Sometimes Python and C++ are similar, and my very limited knowledge of C++ is not helping (Limited knowledge due to some Arduino fiddling, and is not real C++)
my code was Python, I don’t know if “ternary operators” Someone has told me they are called in this way are similar in C++, do you know why it is called ternary?
Good for my part to follow the “boy Scout Rule”.
My two sons are “Scouts” and usually calling them “Boy Scouts” is considerate a joke here in Europe
But these considerations are clearly OT.
Probably I have to follow another rule “Think twice before writing a post!” or maybe “three of more times” but now “how to call this rule!” “common sense rule”?