Hi Mark,

 | Ok, thats annoying, went for a drink, came back, read this email, looked
 | at my code, did a recompile, and it worked...  its friday isn't it?

Leigh's comments re stack set-up not withstanding, one other point to
remember is that it also depends where in the outer procedure the variable
is defined. i.e.

This works:

  procedure p1;
  var
    s: string

    procedure P2;
    begin
      S := 'Test';      
    end;

  begin
    s := 'Start';
    p2;
    ShowMessage(s);     
  end;

This doesn't!

  procedure p1;

    procedure P2;
    begin
      S := 'Test';      
    end;

  var
    s: string

  begin
    s := 'Start';
    p2;
    ShowMessage(s);     
  end;

Hope this helps.

Regards,
Mark Grimmond
Dick Smith Electronics Pty Ltd
[EMAIL PROTECTED]
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to