[asterisk-users] How to write a function with a return value in Asterisk

Andrew Kohlsmith akohlsmith-asterisk at benshaw.com
Wed Aug 8 12:34:56 CDT 2007


On Wednesday 08 August 2007 1:17:24 pm Jay R. Ashworth wrote:
> > Digium has taken the stance that it's better to set arbitrary variable
> > names to arbitrary values rather than allow what many would consider the
> > perfectly accepted method of using a $? type of return code in addition
> > to any application-specific variables.

> Digium has taken the stance that Structured Programming is a Bad Idea?

I don't think it's fair to paint it quite so broadly.  M opinion on it is that 
I have simply failed to show them how clear things become when I can check 
ONE variable for the status of the last-run application, whether that be a 
dial, system or agi application call.

Look at the Asterisk source; it's not a mass of spaghetti code.  Saying that 
Digium thinks that structured programming is a bad idea is an exaggeration.

-A.



More information about the asterisk-users mailing list