[OpenSIPS-Devel] [ opensips-Feature Requests-2845500 ] Simplified logic testing

SourceForge.net noreply at sourceforge.net
Thu Sep 17 16:54:43 CEST 2009


Feature Requests item #2845500, was opened at 2009-08-27 14:13
Message generated for change (Comment added) made by bogdan_iancu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086413&aid=2845500&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Stanislaw Pitucha (viraptor)
>Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: Simplified logic testing

Initial Comment:
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))"

----------------------------------------------------------------------

>Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2009-09-17 17:54

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

if (route(x)_) {}

bogdan

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086413&aid=2845500&group_id=232389



More information about the Devel mailing list