Добавил:
Xer1t
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:
unit ControlSisi;
interface
procedure Sisi ( pole:string; var znachenie:Char);
procedure XEXE (prostr,prostr2,prostr3,prostr4: string; var a:Boolean) ;
implementation
procedure sisi (pole:string; var znachenie:Char) ;
begin
case Znachenie of
'0'..'9':;
#8:;
',' : if pos(',',pole)<>0 then Znachenie:=#0;
'-' :if Pos('-',pole)<>0 then znachenie:=#0;
else znachenie:=#0;
end;
end;
procedure XEXE (prostr,prostr2,prostr3,prostr4: string; var a:Boolean);
begin
if (prostr='-')
or ((Pos('-',prostr)<>0))and((Pos('-',prostr)<>1))
or ((Pos('-',prostr2)<>0))and((Pos('-',prostr2)<>1))
or ((Pos('-',prostr3)<>0))and((Pos('-',prostr3)<>1))
or ((Pos('-',prostr4)<>0))and((Pos('-',prostr3)<>1))
or (prostr='')or(prostr2='') or(prostr3='') or(prostr4='')
then
begin
a:=False
end
else
a:=True
end;
end.
interface
procedure Sisi ( pole:string; var znachenie:Char);
procedure XEXE (prostr,prostr2,prostr3,prostr4: string; var a:Boolean) ;
implementation
procedure sisi (pole:string; var znachenie:Char) ;
begin
case Znachenie of
'0'..'9':;
#8:;
',' : if pos(',',pole)<>0 then Znachenie:=#0;
'-' :if Pos('-',pole)<>0 then znachenie:=#0;
else znachenie:=#0;
end;
end;
procedure XEXE (prostr,prostr2,prostr3,prostr4: string; var a:Boolean);
begin
if (prostr='-')
or ((Pos('-',prostr)<>0))and((Pos('-',prostr)<>1))
or ((Pos('-',prostr2)<>0))and((Pos('-',prostr2)<>1))
or ((Pos('-',prostr3)<>0))and((Pos('-',prostr3)<>1))
or ((Pos('-',prostr4)<>0))and((Pos('-',prostr3)<>1))
or (prostr='')or(prostr2='') or(prostr3='') or(prostr4='')
then
begin
a:=False
end
else
a:=True
end;
end.