#143353 - 2005-07-12 06:22 PM
Re: Pre-Tokenized Scripts - Performance Impact?
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
Quote:
I hope not. I still insist that included script should not have own scope but share the global scope of the including script. just like it was intended in the first place.
if one wants to have subscopes, there are methods for doing that.
Tricky. Either it should have it's own scope in which case DIMmed variables are local to the included script (as it is at the moment) and exit will cause an exit only from the included script (which it doesn't) or it is simply merged in-line in which case locally dimmed variables are visible in the including parent script and exit causes an exit from the parent script.
It should definately do one or the other, and not mix the two.
As to which is preferable, well that's up for debate.
If INCLUDEd files have their own scope then sub-scripts which have been developed using CALL will work with INCLUDE with no change. I can't think of any major benefit of having INCLUDEd code in the same scope as the parent script.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 661 anonymous users online.
|
|
|