From: Pit Capitain Date: 2002-07-01T18:13:24+09:00 Subject: Re: functions need declaring before use On 1 Jul 2002, at 17:09, Niklas Frykholm wrote: > [Daniel]: > > I've noticed that functions require that they be declared before > > they can be used. This came as somewhat as a blow as I orgaznie my > > code by putting my main code first, and function listing at the end. > > Is this set in stone? Plans to change? Reasoning? ... > If you want to keep your style, I suggest you put your main code > in a main function and call it at the end of the program. > > def main > ... > end > > ... other functions ... > > main() You can also use an END block: ,----[ script ] | | END { | # main function | } | | # other functions | `---- Regards, Pit