home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
mbug
/
mbug027.arc
/
PEDIGREE.DOC
< prev
next >
Wrap
Text File
|
1979-12-31
|
13KB
|
316 lines
.mt0
PEDIGREE DOCUMENTATION
INTRODUCTION
╔ wrotσ thi≤ prograφ t∩ hel≡ m∙ breedinτ plaε fo≥ m∙ rabbits¼ ye≤ ì
rabbits« ╔ founΣ usinτ card≤ diΣ no⌠ sui⌠ mσ o≥ tel∞ mσ thσ ì
information I required. I needed to know:
1. Which Buck had been mated with which Doe.
2. How many offspring occurred from the mating.
3« Thσ Datσ oµ thσ las⌠ matinτ anΣ thσ lengtΦ oµ timσ iε ì
days.
4. The pedigree of any of the rabbits.
Thσ prograφ wa≤ writteε t∩ sui⌠ thesσ needs« Thσ prograφ doe≤ ì
havσ onσ DELIBERAT┼ error« Thi≤ i≤ iε thσ agσ routine« ╔ ì
requireΣ t∩ kno≈ ho≈ olΣ aε anima∞ wa≤ iε days¼ bu⌠ founΣ tha⌠ ì
afte≥ ß yea≥ thσ day≤ becamσ to∩ biτ s∩ ╔ decideΣ t∩ dividσ i⌠ ì
int∩ week≤ anΣ years« ╔ diΣ no⌠ usσ month≤ a≤ the∙ arσ oµ ì
differen⌠ length≤ s∩ no⌠ exac⌠ enough« ╔ dividσd thσ yea≥ int∩ ì
5▓ week≤ whicΦ i≤ onσ o≥ tw∩ day≤ short« Iµ thi≤ i≤ no⌠ gooΣ ì
enough it should be easy enough to fix and recompile.
Therσ arσ tw∩ program≤ PED▒ anΣ PED2« The∙ botΦ d∩ thσ samσ job« ì
PED▒ i≤ totall∙ writteε b∙ me¼ PED▓ use≤ TURB╧ TOO╠ BOX« Thσ onl∙ ì
differencσ iε operatioε i≤ tha⌠ PED▒ need≤ t∩ bσ SORTE─ wherσ ì
PED2 is indexed.
******* SCRATCH PAD *******
Thσ prograφ relie≤ oε ever∙ anima∞ havinτ ß distinc⌠ number« ┴ ì
numbe≥ oµ othe≥ program≤ ruε thi≤ wa∙ anΣ requirσ yo⌡ t∩ ente≥ ì
thi≤ numbe≥ wheε yo⌡ wan⌠ somσ information« A≤ ╔ finΣ i⌠ harΣ t∩ ì
kee≡ al∞ thσ number≤ iε m∙ heaΣ ╔ woulΣ havσ t∩ writσ theφ dowε ì
oε ß piecσ oµ paper« ╔ wanteΣ thσ prograφ t∩ kee≡ tracδ oµ thesσ ì
number≤ fo≥ mσ s∩ ╔ usσ ß scratcΦ paΣ whicΦ i≤ madσ u≡ oµ thσ ì
bottom 6 lines on the screen.
Thi≤ scratcΦ paΣ hold≤ thσ animal'≤ number¼ namσ anΣ sex« Therσ ì
are 3 ways to get this information into the scratch pad.
1« Wheε yo⌡ havσ finisheΣ enterinτ ß ne≈ anima∞ anΣ presseΣ ì
<ESC╛ yo⌡ wil∞ bσ askeΣ iµ yo⌡ wan⌠ thσ anima∞ entered« Iµ yo⌡ ì
do¼ al∞ yo⌡ neeΣ d∩ i≤ pres≤ onσ oµ thσ number≤ betweeε ▒ anΣ ╢ ì
anΣ thσ anima∞ wil∞ bσ placeΣ besidσ tha⌠ numbe≥ iε thσ scratcΦ ì
pad« I⌠ i≤ quitσ possiblσ t∩ pres≤ al∞ si° number≤ anΣ havσ thσ ì
same animal listed six times.
2« Wheε yo⌡ usσ thσ finΣ command yo⌡ caε finΣ aε anima∞ witΦ ì
eithe≥ thei≥ namσ o≥ number« Iµ thσ anima∞ i≤ founΣ yo⌡ wil∞ bσ ì
askeΣ iµ yo⌡ wan⌠ t∩ DELET┼ it¼ EDI╘ it¼ o≥ pu⌠ i⌠ iε thσ scratcΦ ì
pad« Agaiε al∞ yo⌡ neeΣ d∩ i≤ pres≤ ß numbe≥ betweeε ▒ anΣ ╢ t∩ ì
enter it.è
3« Wheε usinτ thσ LIS╘ optioε yo⌡ caε movσ aε arro≈ u≡ anΣ ì
dowε thσ screeε pointinτ t∩ thσ differen⌠ animals« B∙ pressinτ ì
onσ oµ thσ number≤ betweeε ▒ anΣ ╢ tha⌠ anima∞ wil∞ bσ entereΣ ì
into the scratch pad.
******* COMMANDS *******
U Update
ááááááááááááááááááááá╠ List
ááááááááááááááááááááá╞ Family
ááááááááááááááááááááá╨ Pedigree
ááááááááááááááááááááá╙ Sor⌠ (PED▒ only)
******* UPDATE *******
Upoε enterinτ thi≤ sectioε yo⌡ arσ presenteΣ witΦ thσ form belowì
anΣ ß questioε whethe≥ t∩ AD─ ß ne≈ recorΣ o≥ FIN─ an olΣ ì
record.
Animal Number : _____ Name : ____________________ Sex : _
Born : __ ___ 19__ Current Age :
Died : __ ___ 19__
Sire :
Dam :
Comment 1 : ________________________________________
Comment 2 : ________________________________________
Comment 3 : ________________________________________
The following is used for Females only.
Date of Last Mating : __ ___ 19__ Sire :
******* CONTROL KEYS: *******
While entering data you can use the following control keys.
áááááThσ sessioε caε bσ aborteΣ a⌠ an∙ timσ witΦ ß ^┌ o≥ saveΣ ì
áááááwitΦ thσ ESC.
áááááYo⌡ caε ste≡ througΦ thσ forφ witΦ ^┼ anΣ ^╪ o≥ thσ TA┬ key.
^┘ wil∞ deletσ froφ thσ curso≥ t∩ thσ enΣ oµ line«
^G will delete the letter it is on.
^S will move the cursor back one letter.
^D will move the cursor forward one letter.
^A will move the cursor to the start of the line.
^F will move the cursor to the last letter in the line.
áááááYo⌡ caε inser⌠ oε mos⌠ oµ thσ line« A≤ sooε a≤ thσ curso≥ ì
ááááái≤ a⌠ thσ enΣ oµ thσ linσ i⌠ goe≤ t∩ thσ nex⌠ item.
.paè ******* ADD *******
Thi≤ i≤ wherσ al∞ thσ informatioε i≤ entered«
Animal Number: EacΦ Anima∞ mus⌠ havσ ß differen⌠ I─ number« Thi≤ ì
ááááááááááááááácaε bσ ASCI╔ o≥ ß numbe≥ o≥ both« Thσ prograφ ì
ááááááááááááááácheck≤ fo≥ duplicatσ number≤ anΣ iµ founΣ yo⌡ arσ ì
ááááááááááááááánotified.
Name: The animal can have any name you so desire.
Sex: This can only be F or M
Born: Thσ datσ routinσ i≤ ver∙ stric⌠ iε tha⌠ i⌠ wil∞ ì
áááááááááááááááno⌠ le⌠ yo⌡ pas≤ unles≤ thσ datσ i≤ valid« Thσ ì
ááááááááááááááádatσ i≤ entereΣ a≤ 1▒ NO╓ 1986« Thσ montΦ routinσ ì
áááááááááááááááwil∞ onl∙ accep⌠ a≤ ß firs⌠ lette≥ thosσ oµ thσ ì
ááááááááááááááácalendar yea≥ s∩ ╪ i≤ rejected« A≤ therσ i≤ onl∙ ì
áááááááááááááááonσ montΦ startinτ witΦ N¼ a≤ sooε a≤ yo⌡ pres≤ i⌠ ì
áááááááááááááááthe OV is printed for you.
Died: As above.
Age║ Thi≤ i≤ workeΣ ou⌠ fo≥ you« Iµ thσ anima∞ i≤ ì
ááááááááááááááástil∞ alivσ thσ agσ i≤ workeΣ ou⌠ froφ Borε anΣ ì
áááááááááááááááthσ datσ yo⌡ entereΣ oε startinτ thσ program« Iµ ì
áááááááááááááááthe animal is dead then it uses the Died date.
Sire and Dam: Thesσ arσ entereΣ b∙ pressinτ ß numbe≥ betweeε ▒ ì
áááááááááááááááanΣ ╢ whicΦ correspond≤ t∩ thσ Sirσ o≥ Daφ iε thσ ì
áááááááááááááááscratcΦ pad« Thσ namσ i≤ theε displayeΣ iε thσ ì
ááááááááááááááácorrec⌠ place« Iµ yo⌡ d∩ no⌠ kno≈ thσ parent≤ ì
ááááááááááááááájus⌠ pres≤ returε anΣ U╬KNOW╬ MAL┼ anΣ UNKNOW╬ ì
áááááááááááááááFEMALE will be entered for you.
Comment 1: Commen⌠ ▒ ▓ anΣ │ arσ therσ t∩ d∩ wha⌠ yo⌡ likσ ì
áááááááááááááááwith« Afte≥ Commen⌠ │, thσ curso≥ wil∞ returε t∩ ì
áááááááááááááááAnima∞ Numbe≥ unles≤ i⌠ i≤ ß Femalσ theε yo⌡ wil∞ ì
ááááááááááááááábσ takeε t∩ Datσ Las⌠ Mated.
Datσ Las⌠ Mated║ Wheε ß datσ i≤ entereΣ iε thi≤ section¼ thσ ì
ááááááááááááááánex⌠ timσ yo⌡ looδ a⌠ thσ recorΣ thσ numbe≥ oµ ì
ááááááááááááááádays will be displayed.
Mate║ Thi≤ i≤ agaiε entereΣ viß thσ scratcΦ areß ì
numbers.
Afte≥ aε Anima∞ ha≤ beeε addeΣ i⌠ caε bσ addeΣ t∩ thσ scratcΦ ì
pad. It can then also be edited.
.paè ******* FIND *******
Yo⌡ caε finΣ aε Anima∞ b∙ eithe≥ it≤ numbe≥ o≥ name« Iµ usinτ ì
PED▒ thσ anima∞ numbe≥ i≤ bes⌠ wa∙ fo≥ ß biτ filσ a≤ i⌠ use≤ ß ì
binar∙ searcΦ oε thσ file« Thi≤ mean≤ thσ numbe≥ caε bσ locateΣ ì
withiε 1░ look≤ oµ ß 100░ animal≤ file« Thσ filσ MUS╘ bσ iε thσ ì
correc⌠ sorteΣ order« Wheε lookinτ fo≥ ß Namσ i⌠ ha≤ t∩ reaΣ anΣ ì
comparσ eacΦ record« I⌠ als∩ look≤ fo≥ aε exac⌠ match¼ uppe≥ anΣ ì
lowe≥ case« Iµ usinτ PED▓ i⌠ doe≤ no⌠ matte≥ a≤ i⌠ i≤ indexeΣ oε ì
botΦ Numbe≥ anΣ Name« I⌠ wil∞ als∩ matcΦ looδ alikσ name≤ iε ì
eithe≥ uppe≥ o≥ lowe≥ case« Thσ inde° oε thσ name≤ i≤ kep⌠ iε ì
uppe≥ casσ anΣ you≥ namσ entr∙ i≤ converteΣ t∩ uppe≥ casσ fo≥ ì
thσ search« Thσ namσ kep⌠ iε thσ filσ caε bσ eithe≥ uppe≥ o≥ ì
lower case or a combination.
When the animal is found you can do three things with it.
1« DELET┼ it« Al∞ yo⌡ neeΣ t∩ d∩ i≤ pres≤ ─ anΣ thσ anima∞ i≤ ì
gone« Iε PED▒ thσ animal'≤ numbe≥ i≤ changeΣ t∩ CLEA╥ anΣ i≤ no⌠ ì
trul∙ deleteΣ unti∞ thσ filσ i≤ SORTED« Iε PED▓ thσ indexe≤ arσ ì
updated so as to remove reference of the animal from them.
2« EDI╘ it« B∙ pressinτ ┼ thσ curso≥ wil∞ bσ placeΣ iε thσ ì
Anima∞ Numbe≥ sectioε oµ thσ screen« B∙ usinτ thσ contro∞ key≤ ì
yo⌡ caε ste≡ througΦ thσ recorΣ changinτ ANYTHIN╟ yo⌡ like« Iµ ì
yo⌡ changσ thσ animal'≤ number¼ thi≤ wil∞ bσ checkeΣ t∩ seσ iµ yo⌡ ì
arσ duplicatinτ it« Iµ yo⌡ havσ thσ prograφ wil∞ no⌠ allo≈ yo⌡ ì
t∩ savσ thσ recorΣ unti∞ thσ numbe≥ i≤ changed« Yo⌡ caε abor⌠ ì
witΦ ^┌ a⌠ an∙ timσ and thσ olΣ recorΣ stay≤ intact« Wheε yo⌡ ì
savσ thσ editeΣ record¼ iµ yo⌡ havσ changeΣ an∙ oµ thσ ì
informatioε tha⌠ i≤ displayeΣ iε thσ scratcΦ pad¼ anΣ thσ anima∞ ì
is in the scratch pad, the new information will be displayed.
3« Ente≥ i⌠ int∩ thσ scratcΦ pad« I⌠ i≤ alway≤ ß gooΣ ideß t∩ ì
ente≥ i⌠ int∩ thi≤ areß beforσ editing« Iµ somethinτ goe≤ wronτ ì
i⌠ i≤ ver∙ quicδ t∩ abor⌠ anΣ theε cal∞ i⌠ u≡ agaiε froφ thσ ì
scratch pad.
******* LIST *******
Thσ Lis⌠ commanΣ onl∙ list≤ al∞ thσ animal≤ iε thσ orde≥ the∙ arσ ì
iε thσ file« Iµ thσ filσ i≤ sorteΣ theε thσ anima∞ number≤ wil∞ ì
bσ iε correc⌠ order« Yo⌡ havσ thσ optioε oµ statinτ thσ startinτ ì
numbe≥ anΣ whethe≥ yo⌡ wan⌠ thσ lis⌠ t∩ Screeε o≥ Printer« Thσ ì
Printe≥ optioε doe≤ no⌠ worδ oε singlσ sheet« Oε thσ screeε thσ ì
lis⌠ wil∞ sto≡ wheε therσ i≤ ß screeε full« Yo⌡ caε theε usσ ^┼ ì
o≥ ^╪ t∩ movσ ß pointe≥ u≡ anΣ dowε thσ screeε t∩ poin⌠ t∩ thσ ì
anima∞ yo⌡ requireΣ iε thσ scratcΦ pad« Yo⌡ theε pres≤ thσ ì
required number.
.paè ******* PEDIGREE *******
T∩ usσ thσ pedigreσ optioε yo⌡ neeΣ t∩ firs⌠ havσ aε anima∞ iε ì
thσ scratcΦ pad« Wheε firs⌠ enterinτ thσ optioε yo⌡ wil∞ bσ ì
askeΣ whethe≥ yo⌡ wan⌠ thσ displa∙ oε thσ screeε o≥ printer« ì
Afte≥ selectinτ you≥ requireΣ optioε yo⌡ pres≤ thσ numbe≥ ì
correspondinτ t∩ thσ anima∞ yo⌡ wan⌠ thσ pedigreσ on« Therσ wil∞ ì
bσ ß sligh⌠ dela∙ beforσ thσ char⌠ i≤ displayeΣ iε tw∩ forms« ì
Thσ firs⌠ wa∙ i≤ thσ standarΣ pedigreσ layou⌠ anΣ theε follow≤ ì
thσ TAFE╠ method« The Pedigree lists the last 4 generations.
******* FAMILY *******
T∩ usσ thσ family optioε yo⌡ neeΣ t∩ firs⌠ havσ aε anima∞ iε ì
thσ scratcΦ pad« Wheε firs⌠ enterinτ thσ optioε yo⌡ wil∞ bσ ì
askeΣ whethe≥ yo⌡ wan⌠ thσ displa∙ oε thσ screeε o≥ printer« ì
Afte≥ selectinτ you≥ requireΣ optioε yo⌡ pres≤ thσ numbe≥ ì
correspondinτ t∩ thσ anima∞ yo⌡ wan⌠ thσ famil∙ listinτ on« ì
Therσ wil∞ bσ ß sligh⌠ dela∙ a≤ thσ filσ i≤ read¼ then iµ thσ ì
anima∞ i≤ ß Sire¼ eacΦ Daφ tha⌠ ha≤ beeε mateΣ witΦ i⌠ wil∞ bσ ì
displayeΣ witΦ thσ offspring« Thi≤ wil∞ als∩ worδ fo≥ ß Dam¼ ì
listinτ al∞ thσ Sire≤ shσ ha≤ beeε mateΣ witΦ anΣ thσ offspring.
******* COMPILING *******
PED1 is straight forward. You need the include files
{$I CONST.INC}
{$I VARIABLE.INC} {Types and variables}
{$I GENERAL1.INC} {General purpose routines}
{$I AGE.INC} {Age routine}
{$I GENERAL2.INC} {Find_Ear, Display_Form, Display_Rabbit,
F_Table InputStr}
{$I DATE.INC} {Date input routine}
{$I PRINTER.INC} {Printer routine for 12 & 13 }
{$I START.INC} {Startup of Program}
{$I INPUT.INC} {Update starts here. InputRabbit routine}
{$I EDIT.INC} {Edit routine}
{$I UPDATE.INC} {Update Main includes Add and Find routines}
{$I SORT.INC} {Sort routine}
{$I FAMILY.INC} {Family Display}
{$I PEDIGREE.INC} {Pedigree Display}
{$I LIST.INC} {List routine}
{$I MAIN.INC} {Main program}
The program should compile without any problems.
.paèFor PED2 you will need the following include files.
{$I TTCONST.INC} {Consts for Tool Box}
{$I ACCESS.BOX} {Turbo Tool Box}
{$I GETKEY.BOX} {Turbo Tool Box}
{$I ADDKEY.BOX} {Turbo Tool Box}
{$I DELKEY.BOX} {Turbo Tool Box}
{$I TTVAR.INC} {Types and variables}
{$I GENERAL1.INC} {General purpose routines}
{$I AGE.INC} {Age routine}
{$I TTGEN2.INC} {Display_Form, Display_Rabbit, F_Table InputStr}
{$I TTDATE.INC} {Date input routine}
{$I PRINTER.INC} {Printer routine for TTFAMILY & TTPED }
{$I TTINPUT.INC} {Update starts here. InputRabbit routine}
{$I TTEDIT.INC} {Edit routine}
{$I TTUPDATE.INC} {Update Main includes Add and Find routines}
{$I TTSTART.INC} {Startup of Program}
{$I TTFAMILY.INC} {Family Display}
{$I TTPED.INC} {Pedigree Display}
{$I TTLIST.INC} {List routine}
{$I TTMAIN.INC} {Main program}
Yo⌡ wil∞ noticσ tha⌠ yo⌡ neeΣ Turb∩ Too∞ Bo° (no⌠ included⌐ t∩ ì
compilσ thi≤ version« Thσ too∞ bo° als∩ need≤ ß sligh⌠ ì
modificatioε s∩ tha⌠ yo⌡ finisΦ witΦ ▓ overlays« Withou⌠ thσ ì
modification¼ i⌠ wil∞ stil∞ compilσ bu⌠ yo⌡ wil∞ finisΦ witΦ │ ì
overlays« Thσ firs⌠ overla∙ wil∞ onl∙ holΣ ß ver∙ smal∞ bi⌠ oµ ì
code so is wasteful.
Al∞ oµ ADDKEY.BO╪ anΣ DELKEY.BO╪ arσ overlayed« Thi≤ mean≤ tha⌠ ì
thσ worΣ OVERLA┘ need≤ t∩ bσ typeΣ iε fron⌠ oµ thesσ procedures« ì
Thσ GETKEY.BO╪ i≤ furthe≥ modifieΣ iε aεothe≥ way« Yo⌡ neeΣ t∩ ì
movσ thσ Procedurσ TaFindke∙ t∩ thσ star⌠ oµ thσ box« Thσ ì
TaFindke∙ procedurσ i≤ no⌠ overlayed« Thσ res⌠ oµ thσ bo° ISì
overlayed.
******* ERRORS *******
Thσ onl∙ erro≥ ╔ kno≈ of i≤ iε thσ agσ routine« Thi≤ ha≤ beeε ì
discussed previously.
Iµ anybod∙ ha≤ an∙ idea≤ tha⌠ wil∞ improvσ thσ prograφ ╔ woulΣ bσ ì
pleased to hear from you.
P. Billing
áááááááááááááááááááááááááááR.M.B« 1240
áááááááááááááááááááááááááááYINNA╥ 3869
áááááááááááááááááááááááááááAUSTRALIA.
ááááááááááááááááááááááááááá(051⌐ 6╣ 1629