home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
MBUG
/
MBUG027.ARC
/
EDIT.INC
< prev
next >
Wrap
Text File
|
1979-12-31
|
1KB
|
62 lines
PROCEDURE check_ear(VAR ear1 : str5; ear2 : str5);
CONST
Term : CharSet = [^Z,#27];
VAR
ptr : INTEGER;
tc : CHAR;
BEGIN
IF ear1 <> '@@@@@'
THEN
REPEAT
find_ear(ptr,ear1);
IF found
THEN
BEGIN
GotoXY(10,9);
LowVideo;
Write(' D U P L I C A T E Ear number ');
NormVideo;
GotoXY(23,4);
Write('_____');
Ear1 := '';
InputStr(Ear1,5,22,3,term,tc);
Ear1 := UpcaseStr(Ear1);
Fillup(Ear1);
END;
UNTIL (ear2 = ear1) OR (NOT found) OR (TC = ^Z);
GotoXY(10,9);
ClrEOL;
END;
PROCEDURE edit( Animal : Animal_rec);
VAR
ch : CHAR;
no : INTEGER;
ear : str5;
BEGIN
dis(1,2,' E D I T M E N U ');
DisDate;
dis(1,17,' | ^Z = ABORT | <ESC> = FINISHED |');
ClrEOL;
no := Animal.rec_no;
ear := Animal.ear_no;
inputAnimal(Animal,ch);
dis(1,2,' ');
IF ch <> ^Z
THEN
IF (Animal.ear_no <> ear)
THEN
check_ear(Animal.ear_no,ear);
IF ch = #27
THEN
BEGIN
seek(infile,no);
Write(infile,Animal);
update_Animal_Table(Animal);
END;
END;