破晓 2008-03-28 05:35:00
点我顶贴
收藏
删除
freepascal见到这样一段程序
1. 高精度比较
function compare(a,b:bignum):longint;
begin
while a[a[0]]=0 do dec(a[0]);{检查位数是否正确}
while b[b[0]]=0 do dec(b[0]);
while a[a[0]+1]>0 do inc(a[0]);
while b[b[0]+1]>0 do inc(b[0]);
if a[0]>b[0] then exit(1);
if a[0]<b[0] then exit(-1);
for i:=a[0] downto 1 do
begin
if a[i]>b[i] then exit(1);
if a[i]<b[i] then exit(-1);
end;
exit(0);
end;
exit(-1);exit(1);
等表示什么啊?