next up previous contents
Next: Versioning Up: Tips and Tricks Previous: Passing structs as parameters   Contents

Equality expression evaluation: (1 == n), (1 <= n), etc.

When evaluating equality expressions, try to place the constant parameter (if there is one) on the left-hand side. This will reduce the chances of accidentally forgetting an equal (or less-than) sign and thus assigning a variable incorrectly. If the parameter on the left-hand side is constant, the compiler will catch to error if you do make an assignment mistake.



Falko Kuester 2001-08-24