Object Pascal/Procedury i funkcje: Różnice pomiędzy wersjami

Usunięta treść Dodana treść
Bardziej czytelne
Nie podano opisu zmian
 
Linia 174:
Rekurencja jest to zdolność procedury lub funkcji do wywoływania samej siebie. Przykład:
 
<sourcesyntaxhighlight lang="Pascal">
function Potega(a:real; n:integer): real;
begin
Linia 182:
if (n<0) Result := 1 / Potega(a, -n);
end;
</syntaxhighlight>
</source>
 
Skorzystaliśmy tutaj z definicji rekurencyjnej potęgi: