Next: High Integrity CPP Rule 10.19  Up: 10 Expressions  Previous: High Integrity CPP Rule 10.17  Contents

High Integrity CPP Guideline 10.18   Guard the modulus operation to ensure that both arguments are non-negative.

Justification

Use defensive programming to reduce the effect of implementation defined and undefined behaviour.

Reference

Rule ;


HICPP VERSION 2.4  http://www.codingstandard.com   Copyright: © 2007 THE PROGRAMMING RESEARCH GROUP