Topic: Let's have some fun with functions and procedure
Hello Dmitry and all MVD fans,
Let's have some fun, shall we ? :-)
I would like to know how (if possible) I can propagate variables.
Let's say I have this :
function DoSomething1(Data1 : String) : String;
begin
Result := DoSomething1;
end;
function DoSomething2(Data2 : String) : String;
begin
Result := DoSomething2;
end;
...
function DoSomethingN(DataN : String) : String;
begin
Result := DoSomethingN;
end;
and making use of the fuctions, the following procedure :
procedure1...
var
text1, text2... textN : String;
begin
text1 := DoSomething1(Data1);
test2 := DoSomething2(Data2);
...
textN := DoSomethingN(DataN);
end;
Procedure1 is so long that I want to terminate it and continue the logical code in another procedure.
How could I do something like :
procedure 2...
var
info1, info2... infoN : String;
begin
info1 := text1;
info2 := text2;
...
infoN := textN;
end;
In other words, is it possible to propagate variables through procedures, and if yes, how ?
Wish you all a good day, it's good to be back !!
Mathias
Each time I get a divorce, I keep the house
Zaza Gabor