The following tips are provided as an aid to writting readable, portable code. I have not made any of these up - they have all been culled from texts on programming techniques. I can provide some references if needed.
These are not laws. They can be violated. However you should have a good reason for violating these hints, and you should put a comment in your code saying why they are violated.
The hints are provided to try and help when writting code in FORTRAN(77), ANSI C and C++ under Unix (Linux), Windows NT (MS compilers) and VMS. Note that many older texts on C use KR C, not ANSI C. Note also, that C++ is in state of flux. Their is not a standard for C++. There is a Draft ANSI standard, but not all compilers comply with it. In particular, CINT has some deficiencies.
IF (X.GT.0) THEN
Y = SQRT(X)
ELSE
Y = 0.
ENDIF
if (x>0) {
y = sqrt(x);
} else {
y = 0.;
};