var
 scope:string;
 i,index:integer;
 Label myLabel;
begin
 scope:='0';
 myLabel: if inputQuery('移动对话框','请输入要移动的位数:',scope) then
 val(scope,i,index);
 if index=0 then
 Table1.moveby(i)
 else
 begin
  if Form2.ShowModal=mrok then
     Form2.free;
     goto myLabel;
 end;