בברכה, אלון.
function power(a,n:integer):integer;begin if n=0 then power:=1 else power:=a*power(a,n-1); end;