#37 Simplified logic testing

open
core (12)
5
2009-09-17
2009-08-27
No

Condition logic could be simplified in two cases:

1. "if (value)" could be equivalent to a truth test "if (value>0)"

2. statements that set $retcode could return them directly too, so that "route(x); if ($retcode>0)" can be written as "if (route(x))"

Discussion

  • but if I'm not wrong, you can do that.
    route(x) {return(1);}

    if (route(x)_) {}

    bogdan

     
    • assigned_to: nobody --> bogdan_iancu