Re: OOP style
- From: "Bruce Roberts" <ber@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 25 Aug 2005 17:07:09 -0400
"swansnow" <schultz@xxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1125001669.617678.171510@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Nested routines... Do you mean you declare procedures inside a
> procedure? That sounds intriguing.
Yes.
> In my scenario of a humongous method, needing to be broken down, then,
> would you put the "helper" methods nested inside the "main" method?
> Scope-wise, does this mean that the nested procedures are only visible
> to the containing procedure? Do they have access to the class's
> variables, and the containing procedure's variables, too?
Yes. Yes. I'm not clear on what you are trying to ask in your last question.
The Delphi (Object Pascal) Language Reference section of the help details
this in an early chapter - its a good read anyway.
procedure One;
var vOne : tType;
begin
end;
procedure Two;
Procedure TwoOne;
var vTwoOne : tType;
Function TwoTwo : tType;
begin
end;
var vTwoOne2 : tType;
begin
end;
begin
end;
One sees vOne, and Two but nothing inside Two. Two sees One, but nothing
inside it. It also sees TwoOne, but nothing inside it. TwoTwo sees TwoOne,
Two, and One. It also sees vTwoOne, but not vTwoOne2.
.
- Follow-Ups:
- Re: OOP style
- From: swansnow
- Re: OOP style
- References:
- OOP style
- From: swansnow
- Re: OOP style
- From: Bruce Roberts
- Re: OOP style
- From: swansnow
- OOP style
- Prev by Date: Re: OOP style
- Next by Date: Re: OOP style
- Previous by thread: Re: OOP style
- Next by thread: Re: OOP style
- Index(es):