Avatar of hidrau
hidrau
Flag for Brazil asked on

What is the advantage to have a function or procedure created inside another function or procedure?

Hello Guys,

This is an example:

procedure SumAllValue: Integer;
	   Function Sum_A_B(a, b : integer): Integer;
	   Begin 
	   End;
	Begin 

	  My code here calls the Sum_A_B(x,y)
	End;    

Open in new window


Is there any advantage using that way? Or would it be better to have it in a unit library or even create it for all my unit?

Is it only concept?

Thanks
Alexandre
Delphi

Avatar of undefined
Last Comment
hidrau

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Mike McCracken

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
hidrau

ASKER
thanks a lot
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck