krfkeith / la-pe

Automatically exported from code.google.com/p/la-pe
0 stars 0 forks source link

Nested Methods - Accessing outer variables #37

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What will reproduce the problem?

procedure A;
var
   B:Boolean;
procedure C;
begin
   Writeln(B); <--- cannot find B!
end;

begin
   B:=True;
   C;
End;

What is the expected output? What do you see instead?

Being able to access B.

Which version are you using?

Latest through Simba, code.google.com, and other repos. None work.

Please provide any additional information below.

Contact me via email, I am keen on hiring you to fix this and a few other 
things.

Original issue reported on code.google.com by 3FWebHos...@gmail.com on 8 May 2015 at 5:20

GoogleCodeExporter commented 9 years ago
You may want to add parameter accessing too since it's closely related (if 
you're going fpc style).

Example:

procedure Test(x: Integer);
  procedure Sub();
  begin
    x := 50;
  end;
begin

end; 

Original comment by Ollyyyyy...@gmail.com on 10 May 2015 at 3:57

GoogleCodeExporter commented 9 years ago
Thanks for reporting!
What are the other things you'd like to see fixed? For the sake of clarity, I 
think it's better to list them as separate issues.

Original comment by niels....@gmail.com on 21 May 2015 at 8:02