Category : Printer Utilities
Archive   : QLABEL.ZIP
Filename : QLABL_V0.PAS

 
Output of file : QLABL_V0.PAS contained in archive : QLABEL.ZIP

PROGRAM LABELS;
VAR
line1, line2, line3, line4, line5, line6:STRING[50];
x, y:INTEGER;
ch, size:CHAR;

PROCEDURE bar;


BEGIN
FOR x:=1 TO 79 DO
BEGIN
WRITE('_')
END;
WRITELN;
WRITELN
END;

PROCEDURE format;


BEGIN
GoToXY(1,4);
WRITE(' ');
GoToXY(1,4)
END;

PROCEDURE welcome;


BEGIN
ClrScr;
TextColor(Yellow);
WRITELN('Ingas Label Program..... by Andy Frish (c) 1986');
TextColor(2);
bar;
WRITELN;
bar
END;

PROCEDURE GetText;


BEGIN
TextColor(3);
format;
WRITE('Are you printing [');
TextColor(6+Blink);
WRITE('L');
TextColor(3);
WRITE(']arge (1 7/16") or [');
TextColor(6+Blink);
WRITE('S');
TextColor(3);
WRITE(']mall (15/16") labels? ');
REPEAT
READ(Kbd, size)
UNTIL Upcase(size) IN ['L','S'];
size:=Upcase(size);
WRITELN(size);
WRITELN;
TextColor(magenta);
WRITELN;
WRITE('Enter text for line 1: ');
READLN(line1);
WRITE('Enter text for line 2: ');
READLN(line2);
WRITE('Enter text for line 3: ');
READLN(line3);
WRITE('Enter text for line 4: ');
READLN(line4);
IF size = ('L')
THEN BEGIN
WRITE('Enter text for line 5: ');
READLN(line5);
WRITE('Enter text for line 6: ');
READLN(line6)
END
END;

PROCEDURE StartPrint;


BEGIN
TextColor(2);
bar;
TextColor(red);
format;
WRITE('How many labels would you like to print? ');
READLN(y);
WRITELN;
WRITELN;
format;
TextColor(Yellow);
WRITE('Press [');
TextColor(2+Blink);
WRITE('Y');
TextColor(Yellow);
WRITE('] to begin printing, or [');
TextColor(12+Blink);
WRITE('N');
TextColor(Yellow);
WRITE('] to abort : ')
END;

PROCEDURE check;


BEGIN
REPEAT
READ(Kbd, ch)
UNTIL Upcase(ch) IN ['Y','N'];
WRITE(Upcase(ch));
IF Upcase(ch) <> 'Y'
THEN BEGIN
welcome;
GetText;
StartPrint;
check
END
END;

PROCEDURE print;


BEGIN
WRITELN;
WRITELN;
TextColor(1);
format;
WRITE('Printing... (Press [');
TextColor(Yellow+Blink);
WRITE('Ctrl-C');
TextColor(1);
WRITE('] to abort)...');
FOR x:=1 TO y DO
BEGIN
WRITELN(Lst, line1);
WRITELN(Lst, line2);
WRITELN(Lst, line3);
WRITELN(Lst, line4);
IF size = ('L')
THEN BEGIN
WRITELN(Lst, line5);
WRITELN(Lst, line6);
WRITELN(Lst)
END;
WRITELN(Lst);
WRITELN(Lst)
END
END;

PROCEDURE more;


BEGIN
WRITELN;
WRITELN;
TextColor(15);
format;
WRITE('Do you have more labels to print? ');
WRITE('Press [');
TextColor(2+Blink);
WRITE('Y');
TextColor(15);
WRITE('] or [');
TextColor(12+Blink);
WRITE('N');
TextColor(15);
WRITE('] : ');
REPEAT
READ(Kbd, ch)
UNTIL Upcase(ch) IN ['Y','N'];
WRITE(Upcase(ch));
IF Upcase(ch) = 'Y'
THEN BEGIN
welcome;
GetText;
StartPrint;
check;
print;
more
END
END;

PROCEDURE done;


BEGIN
WRITELN;
WRITELN;
TextColor(5);
format;
WRITE('All done.... Have a nice day... Love, Andy');
TextColor(Yellow+Blink);
WRITELN('!');
GoToXY(1,6);
FOR x:=1 TO 10 DO
BEGIN
FOR y:=1 TO 79 DO
BEGIN
WRITE(' ')
END;
WRITELN
END
END;

BEGIN
welcome;
GetText;
StartPrint;
check;
print;
more;
done
END.