[ale] Perl coding style

Chris Fowler cfowler at outpostsentinel.com
Fri Jan 18 11:45:36 EST 2013


On 01/18/2013 10:43 AM, Charles Shapiro wrote:
> Of course, it might have to do with geezer-coders (like me) who learned
> C first. You have to define a subroutine before you can use it in C. You
> can either write an explicit function prototype (e.g. "int
> my_dog_sex(char *,int);" ) before calling your function, or you can
> define the whole function before calling it.  This makes it more
> convenient to put  your functions above your main() call, as then you
> didn't have to type in or maintain prototype lines in addition to the
> functions themselves.


Yes.  My motivation for doing the main() is because it makes it much 
easier to figure out where the program "starts".




More information about the Ale mailing list