home *** CD-ROM | disk | FTP | other *** search
- {A first attempt at a TURBO PASCAL program. Any comments would be welcome!!
- Contact Debbie Hardin, 44 Cedar Drive, Sterling,VA 22170 or leave a message
- on TECHMAIL BBS (703)450-4270}
-
- {= = = = = = = = = = = = = = = = = = =}
- { Version 0.02 & comments by MXM,SJ }
- {= = = = = = = = = = = = = = = = = = =}
- {= = = = = = = = = = = = = = = = = = =}
- { 4 September 1985 02:22:00 }
- {= = = = = = = = = = = = = = = = = = =}
-
- (* * * * * * * *)
- Program Labels; {A program to print file folder labels}
- (* * * * * * * *)
-
-
- Uses
- Crt,
- Printer;
-
- type
- str20 = string[20];
- str40 = string[40];
-
- const
- Done : Boolean = False;
- norm_eps_char = #27#70#27#72#27#18;
- small_eps_char = #27#69#27#71;
- SO = #14;
- SI = #15;
-
- var
- Line1 : str20;
- Line2 : str40;
-
- {---------------------------------------}
- function sezYes: Boolean;
- {---------------------------------------}
- var
- Ch: char; { changed from parameter to local variable - DSMB }
- begin
- Ch := readkey;
- writeln(Ch);
-
- Ch := upcase(Ch);
- if Ch = 'Y'
- then sezYes := True
- else sezYes := False;
-
- end; {ask a yes/no question, get a yes/no/character answer}
-
- {----------------}
- Procedure Input; {Take input from keyboard for labels}
- {----------------}
-
- begin
- clrscr;
- gotoxy(10,10);
- writeln('Please turn printer on and align labels.');
- writeln;
- writeln;
- writeln('Enter the first line for the label...');
- readln(Line1);
- writeln;
- writeln('Enter the second line for the label...');
- readln(Line2);
- writeln;
- clrscr;
- gotoxy(10,10);
- writeln(Line1);
- gotoxy(10,12);
- writeln(Line2);
- writeln;
- writeln;
- end; {input}
-
- {----------------}
- Procedure Print; {Print input taken from keyboard on labels on printer}
- {----------------}
-
- begin
- writeln(lst,small_eps_char);
- writeln(lst,SO,Line1,SI);
- writeln(lst);
- writeln(lst,Line2);
- writeln(lst);
- writeln(lst);
- end; {print}
-
- {----------------------}
- Procedure Label_Check; {Verify label info before printing}
- {----------------------}
-
- begin
- writeln('Is this the label you want? (Y/N)');
- if sezYes then Print;
- end; {check the label before printing}
-
- {---------------------}
- Procedure Done_Check; {Repeat program for all labels wanted}
- {---------------------}
-
- begin
- clrscr; gotoxy(10,10); writeln('Do you want another label?');
- if sezYes
- then done := false
- else done := true;
- end; {All done?}
-
- {--------------------------- Program Area -----------------------------}
-
- begin {main body of program "Labels"}
- while not Done do
- begin
- Input;
- Label_Check;
- Done_Check;
- end; {do}
- writeln(lst,norm_eps_char);
- end.
-