> one more thing I'm curious about: is the backwards C idiom > > if (0 != sometestfunc()) > > instead of the usual > > if (sometestfunc() != 0) > > preferred by amanda developers, or Mr. Mengel? It's very strange to > read, I've never seen it before :)
Well, I can't speak for the other developers but putting the constant on the left is just good C coding practice. It avoids == vs = typographical errors. Put simply: if ( 0 = x ) is a syntax error while if ( x = 0 ) is not; so if you accidentally type = instead of != or ==, you get an error message, instead of unintentionally making an assignment.