[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Compilation order
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 29 Apr 2002 09:30:05 -0300
> It would encourage a more top-down approach to programming
> if definitions could appear later in the source code
> after an identifier has been used.
A definition can appear later than an identifier, as long as you do
not actually call the identifier. So, if you are writing a list of
functions, they can call each other regardless their order (because a
function definition does not run the function).
function main () return foo1() end
function foo1 () return foo2() end
function foo2 () return foo3() end
function foo3 () return foo4() end
[...]
main () -- << start program
-- Roberto