Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I will never have the skills to maintain let alone write a compiler. However, in a situation like this, I would break up the condition into a set of sub-conditions, set intermediate booleans, and progressively build upon the condition tests so as to make the code more intelligible and maintainable. No need for additional functions.

(Amusing incongruity: "boolean" fails the spellchecker in an IT forum :o)



>booleans

C doesn't support native booleans, C99 does-ish. And you can hack it in with

    #typedef enum {false, true} bool;
C uses ints, all the way down, for everything, until you hit turtles.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: