home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
mbug
/
mbug179.arc
/
LABEL.BAS
< prev
next >
Wrap
BASIC Source File
|
1979-12-31
|
4KB
|
100 lines
10 REM **************************************************
20 REM **************************************************
30 REM *** ***
40 REM *** LABEL PROGRAM ---- HARRY HAWKINS ***
50 REM *** ***
60 REM *** OCT 1983 ***
70 REM *** ***
80 REM *** 1. 4 LINE LABELS, 30 CHAR/LABEL ***
90 REM *** ***
100 REM *** 2. FLUSH LEFT OR CENTERED LINES ***
110 REM *** ***
120 REM *** 3. CONFIGURED FOR THE OSBORNE EXEC ***
130 REM *** ***
140 REM **************************************************
150 REM **************************************************
160 REM
170 REM CHR$(26) ***** CLEARS SCREEN *****
180 REM
190 PRINT CHR$(26)
200 PRINT" D A T A L A B E L P R O G R A M "
210 PRINT
220 PRINT"NOTE: RETURN ONLY WILL ENTER A BLANK LINE."
230 PRINT
240 PRINT"ENTER DATA FOR LINE #1 (MAX 30 CHARACTERS)"::LINE INPUT A$
250 IF LEN(A$)>30 THEN PRINT"LINE TOO LONG":GOTO 240
260 PRINT CHR$(26)
270 PRINT"ENTER DATA FOR LINE #2 (MAX 30 CHARACTERS)":LINE INPUT B$
280 IF LEN(B$)>30 THEN PRINT"LINE TOO LONG":GOTO 270
290 PRINT CHR$(26)
300 PRINT"ENTER DATA FOR LINE #3 (MAX 30 CHARACTERS)":LINE INPUT C$
310 IF LEN(C$)>30 THEN PRINT "LINE TOO LONG":GOTO 300
320 PRINT CHR$(26)
330 PRINT"ENTER DATA FOR LINE #4 (MAX 30 CHARACTERS)":LINE INPUT D$
340 IF LEN(D$)>30 THEN PRINT "LINE TOO LONG":GOTO 330
350 PRINT CHR$(26)
360 INPUT "DO YOU WANT PRINTED (P) OR VIDEO (V) OUTPUT?";Z$
370 IF Z$="P" OR Z$="V" THEN GOTO 380 ELSE PRINT"ENTER P OR V ONLY":GOTO 360
380 PRINT CHR$(26)
390 INPUT "DO YOU WANT CENTERED LINES ? <Y OR N>";X$
400 IF X$="Y" OR X$="N" THEN GOTO 410 ELSE PRINT"ENTER ONLY Y OR N.":GOTO 390
410 IF X$="Y" AND Z$="P" THEN GOTO 450:REM CENTERED AND PRINTED
420 IF X$="N" AND Z$="P" THEN GOTO 560:REM FLUSH LEFT AND PRINTED
430 IF X$="N" AND Z$="V" THEN GOTO 710:REM FLUSH LEFT AND VIDEO
440 IF X$="Y" AND Z$="V" THEN GOTO 850: REM CENTERED AND VIDEO
450 PRINT CHR$(26): REM ***** PRINTED AND CENTERED LABELS *****
460 INPUT "HOW MANY LABELS DO YOU WANT?";N
470 FOR Q=1 TO N
480 LPRINT SPC((34-LEN(A$))/2);A$
490 LPRINT SPC((34-LEN(B$))/2);B$
500 LPRINT SPC((34-LEN(C$))/2);C$
510 LPRINT SPC((34-LEN(D$))/2);D$
520 LPRINT:LPRINT
530 NEXT Q
540 GOTO 660
550 REM
560 PRINT CHR$(26): REM ***** FLUSH LEFT AND PRINTED LABELS *****
570 REM
580 INPUT "HOW MANY LABELS DO YOU WANT?";N
590 FOR Q=1 TO N
600 LPRINT SPC(10);A$
610 LPRINT SPC(10);B$
620 LPRINT SPC(10);C$
630 LPRINT SPC(10);D$
640 LPRINT:LPRINT
650 NEXT Q
660 INPUT "TO END TYPE <E>, TO RUN MORE OF THE SAME LABELS TYPE <M>";E$
670 IF E$="E" OR E$="M" THEN GOTO 680 ELSE PRINT "ENTER ONLY E OR M":GOTO 660
680 IF E$="M" AND X$="N" THEN GOTO 560
690 IF E$="M" AND X$="Y" THEN GOTO 460 ELSE 980
700 REM
710 PRINT CHR$(26):REM ***** FLUSH LEFT VIDEO DISPLAY OF A LABEL *****
720 REM
730 PRINT" THE LABEL YOU DESIGNED WILL LOOK LIKE THE ONE SHOWN BELOW "
740 PRINT:PRINT:PRINT:PRINT
750 PRINT"Line #1 ";A$
760 PRINT"Line #2 ";B$
770 PRINT"Line #3 ";C$
780 PRINT"Line #4 ";D$
790 PRINT:PRINT:PRINT:PRINT
800 INPUT "TO END TYPE <E>, TO PRINT THIS LABEL TYPE <P>.";F$
810 IF F$="E" OR F$="P" THEN GOTO 820 ELSE PRINT"ENTER ONLY E OR P":GOTO 800
820 IF F$="E" THEN GOTO 980
830 IF F$="P" THEN GOTO 560
840 REM
850 PRINT CHR$(26): REM ***** SHOW CENTERED LABEL ON VIDEO *****
860 REM
870 PRINT"THE LABEL YOU DESIGNED WILL LOOK LIKE THE ONE BELOW "
880 PRINT:PRINT:PRINT:PRINT
890 PRINT"Line #1 "; SPC((34-LEN(A$))/2);A$
900 PRINT"Line #2 "; SPC((34-LEN(B$))/2);B$
910 PRINT"Line #3 "; SPC((34-LEN(C$))/2);C$
920 PRINT"Line #4 "; SPC((34-LEN(D$))/2);D$
930 PRINT:PRINT:PRINT:PRINT
940 INPUT "TO END TYPE <E>, TO PRINT THIS LABEL ENTER <P>.";G$
950 IF G$="E" OR G$="P" THEN GOTO 960 ELSE PRINT"ENTER ONLY E OR P":GOTO 940
960 IF G$="E" THEN 980
970 GOTO 450
980 END
950 IF G$="E" OR G$="P" THEN GOTO 960 ELSE PRI