Home > Back-end >  If in C Builder (aa) and if the difference between (aa==true)
If in C Builder (aa) and if the difference between (aa==true)

Time:10-01

Each prawn:
I made a small program, including
Bool aa;
Aa=true;
I found the if (aa) {,,,,,,,,} sometimes not able to perform; Whether to switch to the if (aa==true) {,,,,,,,,} to just go?

CodePudding user response:

If (aa) is equivalent to the if (aa==true), the if (! Aa) is equivalent to the if (aa==false), this is the rules of the C language or calling conventions such as C # language in the same way, if your code is that you write, it is absolutely right

CodePudding user response:

To track it and see, the code should be yes

CodePudding user response:

It said no difference

CodePudding user response:

I am made of C Builder6 code sometimes really don't perform,

CodePudding user response:

The complete code posted see

CB6, if nested if statements, if you put an if nested under an if, and under the first if you have any else I've encountered a problem

CodePudding user response:

Aa is a bool variable, you should write the if (aa), write an if (aa==true) it is illegal to programming specification
  • Related