[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: defining functions at the end of a script file

From: Miroslaw Kwasniak
Subject: Re: defining functions at the end of a script file
Date: Wed, 15 Aug 2007 20:19:01 +0200
User-agent: Mutt/1.5.9i

On Wed, Aug 15, 2007 at 05:29:21PM +0200, address@hidden wrote:

> Hallo,

> for stylistic reasons I would like to define functions used in a
> script file at the end of the file, after they were already called.
> Is there a way to do that?

I think it isn't possible - without acrobation (and double call of
this script file).
> Optionally, I could group all functions in a separate file, but
> preferably not a file for each function, since they woud not be used
> in other occations, so I make my directory cleaner and work with
> fewer files. Is there a way to do that as well?

Yes, make a script not function m-file ;)
It sounds dumb but it's simple: write any executable line before first
function declaration - in this case I usually write if first line:


Than at beginning of your main script call that script with functions

reply via email to

[Prev in Thread] Current Thread [Next in Thread]