When you are asked in a question to specify a precondition as a valid boolean expression for a certain procedure. Is this just a comment within the procedure or do you have to write an if statement where the outcome is true? This is on a PDL question.
Preconditions
Collapse
X
-
Tags: None
-
A pre-condition occurs before the procedure.
A post-condition occurs after the procedure.
[code=c]
PreCondition();
// the procedure
PostCondition() ;
[/code]
All the boolean would mean is if the procondition were true then execute the procedure:
[code=c]
if (PreCondition() )
{
// the procedure
}
PostCondition() ;
[/code] -
Comment