A logical statement is one that will return a boolean or a logical "True" or "False" output. It is used in cases where conditions need to be executed.
For ex: lets say you write a system that checks the age of the visitors to a bar, the system should only allow people who are over 18 yrs of age. So the logical condition will be like below:
if(age > 18) then "Let the Customer Enter"
else "The customer is a minor, send them back to stay out of trouble"
Chat with our AI personalities
Sequence
isdigit is an example (see in ctype.h)
you are a full time wanker.
IF, in C and C++, is not a function - it is a statement. There are two parameters... if (expression) statement; The expression is evaluated. If it has logical result true, or arithmentic result not zero, the statement is executed; if not, the statement is not executed. The statement can be a single statement, in which it is terminated with a semi-colon, or it can be a block of statements, in which it is surrounded by braces.
The following is for F90 and later: if ( .not. foo ) thencall someSubroutine(with,awesome,variables)elsecall explosion(muwhaha)end if