function trim0(s:string):string; begin while copy(s,1,1)='0' do s:=copy(s,2,length(s)-1); trim0:=s; end;