[ZPT] some questions

Dieter Maurer dieter@handshake.de
Fri, 19 Oct 2001 23:42:30 +0200 (CEST)


Tom Deprez writes:
 > Now more practical questions:
 > 
 > * Why do we use:  repeat/object/index and not repeat/index or repeat/even
 > It is variable of the repeat which knows on which position we are.
 > Like 'for i in []:' i is a variable of the repeating loop. Now we use the
 > index of the eg object
 > Are am I wrong in this?
You can have nested loops. Therefore, instead of "repeat/index"
you use "repeat/<loop-id>/index".

 > * When you first declare a global name and  when you later declare a local
 > name...
 > are these handled as 2 different variables?
I remember that this is clearly specified in the specification.

When I remember right, the answer is "yes":

  They define two independent variables. The local one
  hides the global one inside its scope (provided the global
  one is defined outside this scope).


Dieter