Procedural Types_(re)

Fri, 11 Jul 1997 15:23:41 +0200



Peter Gerwinski wrote:

> Ah - now I have it!  :-)  With high probability that's another shape
> of a known bug:  You cannot assign procedures defined in a *program*
> to procedural variables (or procedural pointers, like in your example). 
> :-(
> 
> [...]
>
> These procedures are treated as local subprocedures of the main
> program which is a procedure by itself.  This is the source of
> a lot of trouble, also in other contexts, 

What's the difference? The stack frame? If so, could it be possible to create
a stub for each such procedure that sets up the correct stack frame and calls
the "local" global procedure?

> but it is necessary to
> make some nonlocal `goto's work which are required by Extended
> Pascal.  (No, I don't use `goto', and I don't know more about
> this, sorry.  If I had a test program for these nonlocal `goto's,
> I could try to make the other stuff work *without* breaking `goto';
> right now I don't dare to touch this. ;-)

Perhaps something like the following (just guessing):

program argh;

label l;

procedure p;
begin
  writeln(1);
  goto l;
  writeln(2)
end;

begin
  writeln(3);
  p;
  writeln(4);
l:writeln(5)
end.
-- 
Frank Heckenbach, Erlangen, Germany
heckenb@mi.uni-erlangen.de
http://www.mi.uni-erlangen.de/~heckenb/links.htm


Frank Heckenbach (heckenb@mi.uni-erlangen.de)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es