home *** CD-ROM | disk | FTP | other *** search
- program tickle;
-
- const
- ver = '1.01';
- dataname = 'TICKLE.DTA';
- logname = 'TICKLOG.DTA';
- bs = #8;
- ff = #12;
- nuldate = '50-50-50';
- scroll = 20;
-
- type
- datestr = string[8];
- notestr = string[80];
- string3 = string[3];
-
- tickletype = record
- date: datestr;
- note: notestr;
- end;
-
- regpack = record
- ax,bx,cx,dx,bp,di,si,ds,es,flags:integer;
- end;
-
- sortary = array[0..500] of datestr;
-
- var
- backfile: file of tickletype;
- backrec: tickletype;
- logfile: file of tickletype;
- logrec: tickletype;
- ticklefile: file of tickletype;
- ticklerec: tickletype;
- sourcefile: file of tickletype;
- sourcerec: tickletype;
- filename: string[14];
- horizon,indate,searchdate: datestr;
- innote: notestr;
- code,delno,i,j,numnotes,words: integer;
- match: boolean;
- commandkey,response: char;
-
- sortkey: sortary;
- dateary: array[0..500] of datestr;
- noteary: array[0..500] of notestr;
- dispary: array[0..500] of datestr;
-
- function allcaps(instr:notestr):notestr;
- var
- temp:notestr;
- begin
- temp:='';
- for j:=1 to length(instr) do temp:=temp+upcase(instr[j]);
- allcaps:=temp;
- end;
-
- procedure beep;begin write(#7);delay(100);end;
-
- function gooddate:boolean;
- var
- ch: char;
- temp: boolean;
- begin
- temp:=true;
- if (length(paramstr(1))>1) and (length(paramstr(1))<8) then temp:=false
- else for j:=2 to length(paramstr(1)) do begin
- ch:=copy(paramstr(1),j,1);
- case j of
- 1,2,4,5,7,8: if not(ch in ['0'..'9','?']) then temp:=false;
- 3,6 : if not(ch in ['-','/']) then temp:=false;
- end;
- end;
- gooddate:=temp;
- end;
-
- function goodentry:boolean;
- var
- temp: boolean;
- begin
- temp:=false;
- if paramstr(1)='' then temp:=true
- else begin
- commandkey:=copy(paramstr(1),1,1);
- if commandkey in
- ['A','a','B','b','C','c','D','d','E','e','L','l','M','m','O','o',
- 'P','p','Q','q','R','r','S','s','T','t','V','v','W','w','X','x',
- 'Y','y','?'] then temp:=true
- else if (commandkey in ['0'..'9']) and (length(paramstr(1))>1) then
- if gooddate then temp:=true;
- end;
- goodentry:=temp;
- end;
-
- function clockdate:datestr;
- var
- recpack:regpack;
- month,day:string[2];
- year:string[4];
- dx,cx:integer;
- begin
- recpack.ax:=$2a shl 8;
- msdos(recpack);
- str(recpack.cx,year);
- str(recpack.dx mod 256,day);
- str(recpack.dx shr 8,month);
- if length(month)=1 then month:='0'+month;
- if length(day)=1 then day:='0'+day;
- year:=copy(year,3,2);
- clockdate:=month+'-'+day+'-'+year;
- end;
-
- function daysinmonth(mo,yr:integer):integer;
- begin
- case mo of
- 1,3,5,7,8,10,12 : daysinmonth:=31;
- 4,6,9,11 : daysinmonth:=30;
- 2 : if (yr mod 4=0) then daysinmonth:=29 else daysinmonth:=28;
- end;
- end;
-
- function date2num(date:datestr): integer;
- var day,i,month,temp,year:integer; {dates good only from 01-01-81 to 12-31-99}
-
- function daynum(date:datestr):integer;
- var code,temp:integer;
- begin
- val(copy(date,4,2),temp,code);
- daynum:=temp;
- end;
-
- function monthnum(date:datestr):integer;
- var code,temp:integer;
- begin
- val(copy(date,1,2),temp,code);
- monthnum:=temp;
- end;
-
- function yearnum(date:datestr):integer;
- var code,temp:integer;
- begin
- val(copy(date,7,2),temp,code);
- yearnum:=temp;
- end;
-
- begin
- temp:=0;
- day:=daynum(date);month:=monthnum(date);year:=yearnum(date);
- year:=year-80;
- for i:=1 to year-1 do
- if ((i mod 4)=0) then temp:=temp+366 else temp:=temp+365;
- for i:=1 to month-1 do temp:=temp+daysinmonth(i,year);
- temp:=temp+day;
- date2num:=temp;
- end;
-
- function num2date(daynum:integer):datestr;
- label getmo,getdy,start;
- var i,day,month,year:integer;daystr,monthstr,yearstr:string[2];
- begin
- year:=81;
- start:
- for i:=1 to 4 do begin
- if i in [1..3] then daynum:=daynum-365
- else daynum:=daynum-366;
- if daynum<=0 then goto getmo;
- year:=year+1;
- end;
- if daynum>0 then goto start;
- getmo:
- if i in [1..3] then daynum:=daynum+365 else daynum:=daynum+366;
- for i:=1 to 12 do begin
- daynum:=daynum-daysinmonth(i,year);
- if daynum<=0 then goto getdy;
- end;
- getdy:
- daynum:=daynum+daysinmonth(i,year);
- month:=i;
- day:=daynum;
- str(day,daystr);if day<10 then daystr:='0'+daystr;
- str(month,monthstr);if month<10 then monthstr:='0'+monthstr;
- str(year,yearstr);if year<10 then yearstr:='0'+yearstr;
- num2date:=monthstr+'-'+daystr+'-'+yearstr;
- end;
-
- function sortdate(indate:datestr):datestr;
- begin
- sortdate:=copy(indate,7,2)+'-'+copy(indate,1,5);
- end;
-
- function adddate(indate:datestr;adddy,addmo,addyr:integer):datestr;
- var
- code,day_no,
- carry,enddy,endmo,endyr,startmo,startyr : integer;
- endmo_str,endyr_str,temp : datestr;
-
- begin
- if length(indate)=8 then begin
- if adddy<>0 then begin
- day_no:=date2num(indate);
- day_no:=day_no+adddy;
- if day_no>6939 then temp:='Bad Date' else temp:=num2date(day_no);
- end
- else begin
- endmo:=0;endyr:=0;
- val(copy(indate,1,2),startmo,code);
- val(copy(indate,7,2),startyr,code);
- endmo:=startmo+addmo;
- if endmo>12 then begin endmo:=endmo-12;carry:=1;end else carry:=0;
- endyr:=startyr+addyr+carry;
- if endyr>=100 then endyr:=endyr-100;
- str(endyr,endyr_str);
- if length(endyr_str)=1 then endyr_str:='0'+endyr_str;
- str(endmo,endmo_str);
- if length(endmo_str)=1 then endmo_str:='0'+endmo_str;
- temp:=endmo_str+copy(indate,3,4)+endyr_str;
- if sortdate(temp)>'99-12-31' then temp:='Bad Date';
- end
- end
- else temp:='';
- adddate:=temp;
- end;
-
- procedure shell_sort;
- var
- done :boolean;
- jump,i,j,swno: integer;
- tempsort: datestr;
- tempdate: datestr;
- tempdisp: datestr;
- tempnote: notestr;
-
- function firstjump(length: integer): integer;
- var
- temp : integer;
- begin
- temp:=1;
- while temp<=length do temp:=temp*2;
- firstjump:=temp
- end;
-
- begin
- swno:=0;
- jump:=firstjump(numnotes);
- while jump>1 do begin
- jump:=(jump-1) div 2;
- repeat
- done:=true;
- for j:=0 to numnotes-1-jump do begin
- i:=j+jump;
- if sortkey[j]>sortkey[i] then begin
- swno:=swno+1;
- tempsort:=sortkey[j];sortkey[j]:=sortkey[i];sortkey[i]:=tempsort;
- tempnote:=noteary[j];noteary[j]:=noteary[i];noteary[i]:=tempnote;
- tempdate:=dateary[j];dateary[j]:=dateary[i];dateary[i]:=tempdate;
- tempdisp:=dispary[j];dispary[j]:=dispary[i];dispary[i]:=tempdisp;
- done:=false;
- end;
- end;
- until done
- end;
- end;
-
- function wildcard(target:datestr):datestr;
- var
- indate,outdate,thisdate: datestr;
-
- function wildmonth:string3;
- begin
- wildmonth:=copy(thisdate,1,3);
- end;
-
- function wildyear:string3;
- begin
- wildyear:=copy(thisdate,7,2);
- end;
-
- begin
- thisdate:=clockdate;
- indate:=target;
- outdate:='';
- if (copy(indate,1,1)='?') or (copy(indate,2,1)='?') then
- outdate:=outdate+wildmonth
- else outdate:=outdate+copy(indate,1,3);
- if (copy(indate,4,1)='?') or (copy(indate,5,1)='?') then
- outdate:=outdate+copy(thisdate,4,3)
- else outdate:=outdate+copy(indate,4,3);
- if (copy(indate,7,1)='?') or (copy(indate,8,1)='?') then
- outdate:=outdate+wildyear
- else outdate:=outdate+copy(indate,7,2);
- if (copy(indate,1,1)='?') or (copy(indate,2,1)='?') then
- if sortdate(outdate)<sortdate(clockdate) then
- outdate:=adddate(outdate,0,1,0);
- if (copy(indate,7,1)='?') or (copy(indate,8,1)='?') then
- if sortdate(outdate)<sortdate(clockdate) then
- outdate:=adddate(outdate,0,0,1);
- wildcard:=outdate;
- end;
-
- procedure readnotes;begin
- assign(ticklefile,dataname);
- reset(ticklefile);
- numnotes:=0;
- while not eof(ticklefile) do begin
- read(ticklefile,ticklerec);
- dateary[numnotes]:=ticklerec.date;
- if pos('?',ticklerec.date)<>0 then
- dispary[numnotes]:=wildcard(ticklerec.date)
- else dispary[numnotes]:=ticklerec.date;
- if pos('?',ticklerec.date)<>0 then
- sortkey[numnotes]:=sortdate(wildcard(ticklerec.date))
- else sortkey[numnotes]:=sortdate(ticklerec.date);
- noteary[numnotes]:=ticklerec.note;
- numnotes:=numnotes+1;
- end;
- numnotes:=filesize(ticklefile);
- close(ticklefile);
- end;
-
- procedure savenotes;
- var
- k:integer;
- begin
- assign(ticklefile,'TICKLE.DTA');
- rewrite(ticklefile);
- for k:= 0 to numnotes-1 do begin
- ticklerec.date:=dateary[k];
- ticklerec.note:=noteary[k];
- write(ticklefile,ticklerec);
- end;
- close(ticklefile);
- end;
-
- procedure add(date:datestr;note:notestr);begin
- numnotes:=numnotes+1;
- ticklerec.date:=date;
- ticklerec.note:=note;
- assign(ticklefile,dataname);
- reset(ticklefile);
- seek(ticklefile,filesize(ticklefile));
- write(ticklefile,ticklerec);
- close(ticklefile);
- end;
-
- procedure addlog(note:notestr);begin
- logrec.date:=clockdate;
- logrec.note:=note;
- assign(logfile,logname);
- reset(logfile);
- seek(logfile,filesize(logfile));
- write(logfile,logrec);
- close(logfile);
- end;
-
- procedure delete(number:integer);
- var
- k: integer;
- begin
- for k:=number to numnotes-2 do begin
- dateary[k]:=dateary[k+1];
- noteary[k]:=noteary[k+1];
- dispary[k]:=dispary[k+1];
- end;
- numnotes:=numnotes-1;
- savenotes;
- end;
-
- procedure addnote;begin
- indate:=paramstr(1);
- words:=paramcount;
- innote:='';
- for i:=2 to paramcount do innote:=innote+paramstr(i)+' ';
- writeln;writeln('Adding: ',indate,' ',innote);
- add(indate,innote);
- end;
-
- procedure backup;
- var
- drive: char;
- k: integer;
- begin
- writeln;write('Drive for backup (A,B): ');readln(drive);
- drive:=upcase(drive);
- if drive in ['A'..'B'] then begin
- filename:=drive+':'+dataname;
- writeln;write('Backing Up Data File...');
- assign(sourcefile,dataname);
- reset(sourcefile);
- assign(backfile,filename);
- rewrite(backfile);
- while not eof(sourcefile) do begin
- read(sourcefile,sourcerec);
- backrec.date:=sourcerec.date;
- backrec.note:=sourcerec.note;
- write(backfile,backrec);
- end;
- close(sourcefile);
- close(backfile);
- writeln('Done...');
- filename:=drive+':'+logname;
- writeln;write('Backing Up Log File...');
- assign(sourcefile,logname);
- reset(sourcefile);
- assign(backfile,filename);
- rewrite(backfile);
- while not eof(sourcefile) do begin
- read(sourcefile,sourcerec);
- backrec.date:=sourcerec.date;
- backrec.note:=sourcerec.note;
- write(backfile,backrec);
- end;
- close(sourcefile);
- close(backfile);
- writeln('Done...');
- end
- else begin writeln;writeln('Invalid Drive--Backup Aborted');end;
- end;
-
- procedure calculate;
- var
- days2add,mos2add,yrs2add: integer;
- startdate,
- calcdate: datestr;
- begin
- startdate:=nuldate;
- writeln;write('Start Date: ');readln(startdate);
- if startdate<>nuldate then begin
- repeat
- writeln;
- write('Add (1) Days (2) Months/Years: ');readln(response);
- until response in ['1'..'2'];
- if response='1' then begin
- days2add:=0;
- writeln;write('Number Days: ');readln(days2add);
- calcdate:=num2date(date2num(startdate)+days2add);
- end
- else begin
- mos2add:=0;
- writeln;write('Number Months: ');readln(mos2add);
- yrs2add:=0;
- writeln;write('Number Years: ');readln(yrs2add);
- calcdate:=adddate(startdate,0,mos2add,yrs2add);
- end;
- writeln;innote:='';
- write('Note: ');readln(innote);
- writeln;writeln('Adding: ',calcdate,' ',innote);
- add(calcdate,innote);
- end;
- end;
-
- procedure delnote;
- var
- delno_str: string[2];
- resetdate: datestr;
- begin
- match:=false;
- searchdate:=nuldate;
- writeln;write('Delete Date: ');readln(searchdate);
- if searchdate<>nuldate then begin
- for i:=0 to numnotes-1 do begin
- if dispary[i]=searchdate then begin
- match:=true;writeln;
- write(' ',dispary[i]);
- if pos('?',dateary[i])<>0 then write(' + ') else write(' ');
- writeln(noteary[i]);
- response:='N';writeln;
- if pos('?',dateary[i])<>0 then begin
- write('Wildcard Note-Delete ? (Y/N) : N',bs);
- beep;
- end
- else write('Delete ? (Y/N) : N',bs);
- read(response);response:=upcase(response);
- if response='Y' then begin
- delete(i);
- i:=i-1;
- writeln(' Done...');
- end
- else writeln;
- end;
- end;
- end;
- if not match then begin writeln;writeln('Date Not Found');end;
- end;
-
- procedure listheader(instring:notestr);begin
- writeln('TICKLE ',ver,' Today`s Date: ',clockdate,' ',instring);
- end;
-
- procedure listall;begin
- if numnotes=0 then begin writeln;writeln('No Notes in Tickle File');end
- else begin
- writeln;listheader('All Notes');writeln;
- for i:= 0 to numnotes-1 do begin
- if sortdate(dispary[i])<sortdate(clockdate) then begin
- write('- ',dispary[i]);
- if pos('?',dateary[i])<>0 then write(' + ') else write(' ');
- writeln(noteary[i]);
- end
- else if sortdate(dispary[i])=sortdate(clockdate) then begin
- write('* ',dispary[i]);
- if pos('?',dateary[i])<>0 then write(' + ') else write(' ');
- writeln(noteary[i]);
- beep
- end
- else begin
- write(' ',dispary[i]);
- if pos('?',dateary[i])<>0 then write(' + ') else write(' ');
- writeln(noteary[i]);
- end;
- if (i>0) and (i mod scroll=0) then begin
- writeln;write('Press Any Key to Continue...');
- repeat until keypressed;writeln;writeln;
- end;
- end;
- end;
- end;
-
- procedure lognote;
- begin
- match:=false;
- searchdate:=nuldate;
- writeln;write('Log Date: ');readln(searchdate);
- if searchdate<>nuldate then begin
- assign(logfile,logname);
- {$I-} reset(logfile) {$I+};
- if ioresult=1 then rewrite(logfile);
- for i:= 0 to numnotes-1 do begin
- if sortdate(dispary[i])=sortdate(searchdate) then begin
- match:=true;
- writeln;
- write(' ',dispary[i]);
- if pos('?',dateary[i])<>0 then write(' + ') else write(' ');
- writeln(noteary[i]);writeln;
- response:='N';write('Log? (Y/N) : N',bs);read(response);
- response:=upcase(response);
- if response='Y' then begin
- addlog(noteary[i]);
- if pos('?',dateary[i])=0 then begin
- delete(i);
- i:=i-1;
- end;
- numnotes:=numnotes-1;
- writeln(' Done...');
- end
- else writeln;
- end;
- end;
- if not match then begin writeln;writeln('Log Date Not Found');end;
- end;
- end;
-
- procedure eraselog;begin
- assign(logfile,logname);
- {$I-} reset(logfile) {$I+};
- if ioresult=0 then begin
- response:='N';
- writeln;write('Erase Log ? (Y/N) : N',bs);readln(response);
- response:=upcase(response);
- if response='Y' then begin;
- erase(logfile);
- writeln;
- writeln('Log File Erased');
- end;
- end;
- end;
-
- procedure viewlog;
- begin
- writeln;
- assign(logfile,logname);
- {$I-} reset(logfile) {$I+};
- if ioresult=0 then begin
- listheader('TICKLE Log');writeln;
- reset(logfile);
- while not eof(logfile) do begin
- read(logfile,logrec);
- writeln(' ',logrec.date,' ',logrec.note);
- if (i>0) and (i mod scroll=0) then begin
- write('Press Any Key to Continue...');
- repeat until keypressed;writeln;writeln;
- end;
- end;
- end
- else begin
- writeln('Log File Does Not Exist');
- end;
- end;
-
- procedure overdue;
- var
- response: char;
- begin
- for i:= 0 to numnotes-1 do begin
- if sortdate(dispary[i])<sortdate(clockdate) then begin
- writeln;
- write(' ',dispary[i]);
- if pos('?',dateary[i])<>0 then write(' + ') else write(' ');
- writeln(noteary[i]);
- response:='N';write('Delete ? (Y/N) : N',bs);readln(response);
- response:=upcase(response);
- if response='Y' then begin delete(i);i:=i-1;end;
- end;
- end;
- end;
-
- procedure lookahead(days:integer);
- var
- n: integer;
- begin
- horizon:=num2date(date2num(clockdate)+days);
- n:=0;
- for i:= 0 to numnotes-1 do begin
- if sortdate(dispary[i])<sortdate(clockdate) then begin
- n:=n+1;
- write('- ',dispary[i]);
- if pos('?',dateary[i])<>0 then write(' + ') else write(' ');
- writeln(noteary[i]);
- end
- else if sortdate(dispary[i])<=sortdate(horizon) then
- if sortdate(dispary[i])=sortdate(clockdate) then begin
- n:=n+1;
- write('* ',dispary[i]);
- if pos('?',dateary[i])<>0 then write(' + ') else write(' ');
- writeln(noteary[i]);
- beep
- end
- else begin
- n:=n+1;
- write(' ',dispary[i]);
- if pos('?',dateary[i])<>0 then write(' + ') else write(' ');
- writeln(noteary[i]);
- end;
- if (i>0) and (sortdate(dispary[i])<=sortdate(horizon))
- and (n mod scroll=0) then begin
- writeln;write('Press Any Key to Continue...');
- repeat until keypressed;writeln;writeln;
- end;
- end;
- end;
-
- procedure listtoday;begin
- writeln;listheader('Notes for TODAY');writeln;
- lookahead(0);
- end;
-
- procedure listday;begin
- writeln;listheader('Notes for Next DAY');writeln;
- lookahead(1);
- end;
-
- procedure listmonth;begin
- writeln;listheader('Notes for Next MONTH');writeln;
- lookahead(31);
- end;
-
- procedure listquarter;begin
- writeln;listheader('Notes for Next QUARTER');writeln;
- lookahead(92);
- end;
-
- procedure listweek;begin
- writeln;listheader('Notes for Next WEEK');writeln;
- lookahead(7);
- end;
-
- procedure listyear;begin
- writeln;listheader('Notes for Next YEAR');writeln;
- lookahead(365);
- end;
-
- procedure printnotes;begin
- writeln;write('Press Any Key When Printer Ready...');
- repeat until keypressed;
- if numnotes=0 then begin writeln;writeln('No Notes in Tickle File');end
- else begin
- writeln;
- writeln(lst,'TICKLE File Date: ',clockdate);writeln(lst);
- for i:=0 to numnotes-1 do begin
- if i>0 then if copy(dispary[i],1,2)<>copy(dispary[i-1],1,2) then writeln(lst);
- writeln(lst,dispary[i],' ',noteary[i]);
- end;
- writeln(lst,ff,ff);
- end;
- end;
-
- procedure reschedule;
- var
- newdate: datestr;
- begin
- match:=false;
- searchdate:=nuldate;
- writeln;write('Date to be Reset: ');readln(searchdate);
- if searchdate<>nuldate then begin
- writeln;
- for i:=0 to numnotes-1 do begin
- if dispary[i]=searchdate then begin
- match:=true;
- delno:=i;
- write(' ',dispary[i]);
- if pos('?',dateary[i])<>0 then write(' + ') else write(' ');
- writeln(noteary[i]);writeln;
- response:='N';write('Reschedule? (Y/N) : N',bs);readln(response);
- response:=upcase(response);
- if response='Y' then begin
- newdate:='';
- writeln;write('New Date: ');read(newdate);
- if newdate<>'' then begin
- dateary[numnotes]:=newdate;
- dispary[numnotes]:=wildcard(newdate);
- noteary[numnotes]:=noteary[delno];
- add(newdate,noteary[delno]);
- delete(delno);
- i:=i-1;
- writeln(' Done...');writeln;
- end;
- end
- else writeln;
- end;
- end;
- end;
- end;
-
- procedure searchnote;
- var
- searchstr: string[20];
- found: boolean;
- begin
- found:=false;
- searchstr:='';
- writeln;write('Search String: ');readln(searchstr);
- if searchstr<>'' then begin
- writeln;
- for i:=0 to numnotes-1 do
- if pos(allcaps(searchstr),allcaps(noteary[i]))<>0 then begin
- write(' ',dispary[i]);
- if pos('?',dateary[i])<>0 then write(' + ') else write(' ');
- writeln(noteary[i]);
- found:=true;
- end;
- end;
- if not found then writeln('String Not Found');
- end;
-
- procedure help;begin
- writeln;
- writeln('TICKLE Ver. ',ver);
- writeln('Copr. 1987 M. Lee Murrah');
- writeln('10 Cottage Grove Woods, S.E., Cedar Rapids, IA 52403');
- writeln;
- writeln('Notes may be entered in the TICKLE data file by entering the following on the');
- writeln('command line:');
- writeln;
- writeln(' TICKLE MM/DD/YY Note up to 80 characters long');
- writeln;
- writeln('Wild card character "?" may be used for M,Y,and D.');
- writeln;
- writeln('The following tickle commands may be entered on the command line (upper or');
- writeln('lower case) instead of a date and note:');
- writeln;
- writeln('A - List all notes in TICKLE file Q - List TICKLE file for next quarter');
- writeln('B - Backup TICKLE file R - Reschedule TICKLE note');
- writeln('C - Calculate TICKLE date S - Search for TICKLE note');
- writeln('D - List TICKLE notes for tomorrow T - List TICKLE file for today');
- writeln('E - Erase TICKLE log V - View TICKLE log');
- writeln('L - Save note to log file W - List TICKLE notes for next week');
- writeln('M - List TICKLE notes for next month X - Delete TICKLE note');
- writeln('O - Remove overdue TICKLE notes Y - List TICKLE notes for next year');
- writeln('P - Print TICKLE notes file');
- end;
-
- procedure process;begin
- assign(ticklefile,dataname); {create datafile if not existent}
- {$I-} reset(ticklefile) {$I+};
- if ioresult=1 then rewrite(ticklefile);
- assign(logfile,logname); {create log file if not existent}
- {$I-} reset(logfile) {$I+};
- if ioresult=1 then rewrite(logfile);
- readnotes;
- if numnotes>0 then shell_sort;
- if paramstr(1)='' then help
- else begin
- commandkey:=copy(paramstr(1),1,1);
- case commandkey of
- 'A','a' : listall;
- 'B','b' : backup;
- 'C','c' : calculate;
- 'D','d' : listday;
- 'E','e' : eraselog;
- 'L','l' : lognote;
- 'M','m' : listmonth;
- 'O','o' : overdue;
- 'P','p' : printnotes;
- 'Q','q' : listquarter;
- 'R','r' : reschedule;
- 'S','s' : searchnote;
- 'T','t' : listtoday;
- 'V','v' : viewlog;
- 'W','w' : listweek;
- 'X','x' : delnote;
- 'Y','y' : listyear;
- '0'..'9','?': addnote;
- {be sure new commands are added to the goodentry function and help procedure}
- end;
- end;
- end;
-
- begin
- if goodentry then process else begin
- writeln;
- if not gooddate then writeln('Incorrect Date Format')
- else writeln('Incorrect Command');
- end;
- end.
-