Re: Integer skip....

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

At 07:22 p.m. 09-02-99 -0500, you wrote:
>>Rob. It would be very nice to be able to access the "outer"
>>TEST variable from inside the procedure.
>
>You are silly.
>
>integer TEST
>TEST = 1
>
>procedure TESTING()
>  integer LOCAL_TEST
>  LOCAL_TEST = 2
>  ? TEST
>  ? LOCAL_TEST
>end procedure
>
>TESTING()
>
>Why do we need to access the outer variable TEST using something Dumb like
>file.TEST when we can simply rename the inner variable.
>IE: LOCAL_TEST vs the outer variables TEST.
>Or you could rename the outer variable.  I suggest the inner because
>the outer variable has a broader scope.

You can rename everything Lucius. But try to make that on a 2000+ lines of
code
project (and that ain't a BIG project). If you want it worst: in a
multi-developer
enviorment. Since Euphoria ain't OO (and probably won't be ever), large
projects
unevitably relay on global (more exactly: wide scope) variables and
routines. Even
if you want to write highly readable code (one of Euphoria strong points),
you are
oblied to use LOCAL_TEST... what happens when you have testing1(), testing2(),
... testingN()? Should you use identifiers like LOCAL_TEST1... LOCALTESTN?

A way to address a specific scope (or namespace) is a way to "strength" the
language, make it more powerful. I do love Euphoria, and with all things
that I love
I'm willing to make constructive criticism. (excuse my english, I suppose
it's bad
spelled)

>Please deposit your $0.02 worth to continue this discussion.

Ok ;)


Regards,
        Daniel   Berstein
        daber at pair.com

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

Search



Quick Links

User menu

Not signed in.

Misc Menu