Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 522

 
MEN_Odessa:

If you put one = instead of = in if() operator when checking equality condition (erroneously), no errors are produced at any stage (compilation, defective execution). Why?


Do you have a concrete example or where?
 
MEN_Odessa:

If you put one = instead of = in if() operator when checking equality condition (erroneously), no errors are produced at any stage (compilation, defective execution). Why?


It generates the "expression not boolean" warning and the check in the executable code will not work.
 
borilunad:

Why? It always comes up with an error! And pointing to it!
Boris, there are options.
 
tara:
Boris, options are possible.

Am I wrong again?! I don't argue, you are more experienced in programming than I am, that's probably why I haven't had variations when in an if() condition the compiler resolved one identity sign!
 
I'm wrong again?!

Am I wrong again?! I don't bet, you're more experienced in programming than I am, that's probably why I've never had variants, when in condition with if() compiler resolved one equal sign!

I haven't had a single hour of training as a programmer, because I'm not a programmer, perhaps.

And about one equal sign - it may well be, oddly enough.

 
borilunad:

Am I wrong again?! No doubt, you're more experienced in programming than I am, that's probably why I've never had variants, when in a condition with if() the compiler resolved one identity sign!

Growing up, it's no longer "wrong" but "possible options" (:

The compiler really allows it, it's not an error but just a warning and the code compiles. But the check is unlikely to work in the resulting executable. Or the compiler will arbitrarily insert the missing sign (at random, any of suitable <>!=)

 
MEN_Odessa:

If you put one = instead of = in if() operator when checking equality condition (erroneously), no errors are produced at any stage (compilation, defective execution). Why?


Eugene Nikolayevich from Odessa (you set plural yourself) - may be you can answer?
 
evillive:

Growing up, it's not "wrong" anymore, it's "possible variants" (:

And the compiler does allow it, it doesn't give an error, it just gives a warning, the code compiles. But the check is unlikely to work in the resulting executable. Or the compiler will arbitrarily insert the missing character (at random, any of the suitable <>!=)



In some situations it may not warn you.
 
tara:

Yevgeni Nikolaevichi from Odessa (you asked the plural yourself) - can you answer?

I suspect that MEN in this case is not the English word for "people", it's just that in MEN M is the surname.
 
evillive:

I suspect that MEN in this case is not an English word, just that in MEN the M is a surname.

When he responds, maybe we'll find out:)
Reason: