Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
10
Добавлен:
18.07.2019
Размер:
650 б
Скачать
unit Sint;

interface

procedure Control(var Symbol:char; Pole:string);
function Control2(Stroka:string):boolean;

implementation

procedure Control(var Symbol:char; Pole:string);//контроль вводимых символов
begin
case Symbol of
'0'..'9': ;
#13:;
#8: ;
'-': if Pos('-',Pole)<>0 then Symbol:=#0;
',': if Pos(',',Pole)<>0 then Symbol:=#0;
else Symbol:=#0;
end;
end;

function Control2(Stroka:String):boolean;
begin
if (Stroka='') or (Stroka='-')
or ((Pos('-', Stroka)<>0) and (Pos('-', Stroka)<>1))
then Control2:=false else Control2:=true;
end;
end.


Соседние файлы в папке Лаба 8 вар 8
  • #
    18.07.2019446 б11Project1.cfg
  • #
    18.07.20192.02 Кб11Project1.dof
  • #
    18.07.2019188 б11Project1.dpr
  • #
    18.07.2019876 б12Project1.res
  • #
    18.07.2019977 б10Sint.dcu
  • #
    18.07.2019650 б10Sint.pas
  • #
    18.07.20194.7 Кб11Unit1.dcu
  • #
    18.07.201951 б11Unit1.ddp
  • #
    18.07.2019831 б11Unit1.dfm
  • #
    18.07.20191.11 Кб10Unit1.pas
  • #
    18.07.201995.52 Кб24Лаба 8.docx