[Tutor] Defining & Importing Functions
alan.gauld@bt.com
alan.gauld@bt.com
Fri, 18 Oct 2002 17:37:40 +0100
> I've never met a language where you define the functions
> above the main code ... but then I'm not exactly wordly
> wise in programming terms :-)
Its the case in nearly every language I've come across.
And certainly in interpreted code - The interpreter has
to know what a name is before it can use it!
Of compiled languages Pascal, C++(*) and COBOL all
require this...
(*)C++ actually only needs a function declaration to
precede main not the definition, but since declaration
and definition occur at the same place in Python the
effect is the same...
Regards,
Alan g.