[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Perl coding style
- Subject: [ale] Perl coding style
- From: cfowler at outpostsentinel.com (Chris Fowler)
- Date: Fri, 18 Jan 2013 11:45:36 -0500
- In-reply-to: <CADT30qX=AZFasHN8ps14dfs8bR-Xf604fVpymn1hR1+kV4_UkQ@mail.gmail.com>
- References: <1972441501-1358520387-cardhu_decombobulator_blackberry.rim.net-1124875908-@b28.c1.bise6.blackberry> <CADs2hrWVsrxRv3CpMK0k7Bumb6rcFkJKjAYvzkxZkigMbo5Tyg@mail.gmail.com> <[email protected]> <CAEo=5PwspRCTXQCuXY9CWN=vLuYUwwAZgY1fqA21tfOYue4+gA@mail.gmail.com> <[email protected]> <CADT30qX=AZFasHN8ps14dfs8bR-Xf604fVpymn1hR1+kV4_UkQ@mail.gmail.com>
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".