[comp.lang.misc] Simula Question

pabuhr@water.UUCP (07/03/87)

Could someone please help me with the following Simula question.
It has to do with the scope rule in Simula. I do have the SIMULA
BEGIN book but I can't find the answer after an hour of looking.
(The index in that book leaves much to be desired.) Anyway here
is the problem. I have the following definitions:

   CLASS a
      ...
   END CLASS

   CLASS b
      a CLASS c
           x   <- reference
      END CLASS
   END CLASS

The question is: if the name "x" is not defined in "c" where does
Simula look next and so on until it finally reports an undeclared
variable.  The scope search start in "c" then most likely moves to "a"
then it either goes back to "b" and then to the scope around "b" or
directly out of "a" to the scope around "a" (which is the same as the
scope around "b"). If someone knows please let me know too.

Peter Buhr