I am afraid that this is about as good as programming jokes getNow I NOT know what it is, haha ! = NOT. Anyways it's late and that was my first programmers joke ever and a bad one I am sure : )
OSErr theErr = noErr;
CInfoPBRec pBlock; // this is a very large data struct
memset(&pBlock, 0, sizeof(pBlock));
...
theErr = PBSetCatInfoSync(&pBlock);
if (theErr != noErr) return theErr;
if (num ! = 12)
Yes, when ! precedes an expression it changes TRUE to FALSE and FALSE to TRUE.larswik said:So ! this must be false? the (!validInput) was of type boolean which could only result in a True or False answer.
Here is another example from the book,So in this example he is saying if it is NOT equal to 12, is my understanding of that right?Code:if (num ! = 12)
So in the !validInput example it would only execute if it is NOT TRUE or would that convert a TRUE to a FALSE boolean type?
if ( num != 12 ) ...
if ( ! ( num == 12 ) ) ...
That is correct.larswik said:So ! this must be false? the (!validInput) was of type boolean which could only result in a True or False answer.
Right.Here is another example from the book,So in this example he is saying if it is NOT equal to 12, is my understanding of that right?Code:if (num ! = 12)
The first. It is only a test in this case. An assignment statement like:So in the !validInput example it would only execute if it is NOT TRUE or would that convert a TRUE to a FALSE boolean type?
iMeowbot said:The world is filled with books like that! I do wonder how many textbooks are ever shown to people who don't know the subject yet, to see if they make any sense before they are printed.
I am afraid that this is about as good as programming jokes get![]()
larswik said:So in the !validInput example it would only execute if it is NOT TRUE or would that convert a TRUE to a FALSE boolean type?
thank,
-Lars