Both
while MyFunction(1, 2, 3) > 0 do
begin
Temp := MyFunction(1, 2, 3);
ShowMessage(IntToStr(Temp));
end;
and
Temp := MyFunction(1, 2, 3);
while Temp > 0 do
begin
ShowMessage(IntToStr(Temp));
Temp := MyFunction(1, 2, 3);
end;
violate the DRY principle because there are two calls to MyFunction
when only one is necessary.