Re: private routines

new topic     » goto parent     » topic index » view thread      » older message » newer message

Ralf Nieuwenhuijsen wrote:

>The example shows what you want to do.
>I already knew this 'primal' example. Precisely what are the benefits
>compared to this syntax:
>
>atom a, b, c
>
>function foo ()
>     a = 1
>     b = 2
>     ..
>end function
>
>procedure bar ()
>     c = a + b
>end procedure

Ralf, if bar() is to be called from foo() (as I suppose from looking at the
"private routine" example) then bar() would need to be declared first. I
suspect that's what you intended anyway.

I do, however, think that it's more readable to have them separate instead
of one inside of another.

If EU allowed nested routines it WOULD be more CONVENIENT to code on the fly
this way but would encourage bad programming practices (IMHO).

Lewis Townsend.


_______________________________________________________________
Get Free Email and Do More On The Web. Visit http://www.msn.com

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu