home *** CD-ROM | disk | FTP | other *** search
- 00005 REM Basic Program : print
- 00007 REM created : 9.3.86
- 00009 REM from : Volker Sasse
- 00011 REM Structogram saved on disk : Basic-Sicher
- 00013 REM filename : print.spe
- 00015 REM Basic text saved on disk : Basic-Sicher
- 00017 REM filename : print.bas
- 00019 REM
- 00021 REM This program prints structograms in the way you see them on the screen.
- 00023 REM This program needs the font <<print.fon>> as datafile.
- 00025 REM In order to print a structogram make a printfile on a disk with the command print.
- 00027 REM
- 00029 REM You can print a few structograms in one session while you make a walk.
- 00031 REM
- 00033 REM You need a dot matrix printer which is compatible to the Epson MX80.
- 00035 REM The program uses the dual-density bit image mode 960 dots per line.
- 00037 REM If the program does not work reference your printer manual and change the controlcodes.
- 00039 REM
- 00045 REM
- 00047 REM Vereinbarungen
- 00049 REM
- 00051 REM Druckmatrix : Höhe = 10 Punkte, Breite = 8 Punkte
- 00053 Hoehe = 10
- 00055 Breite = 8
- 00057 DIM High$(255), Low$(255)
- 00059 Verschiebung1 = 5
- 00061 Verschiebung2 = 5
- 00063 Zeichensatz$ = ""
- 00065 Punktbreite = 4
- 00067 Punkthoehe = 2
- 00073 COLOR 7,0
- 00075 CLS
- 00077 PRINT "Program for printing SPE structograms"
- 00079 Zeichensatz$="print.fon"
- 00081 PRINT "How many times shall I go over a line (number)";
- 00083 INPUT Doppel
- 00085 Struktogramm$=""
- 00087 DIM Strukto$(50)
- 00089 Stzaehler=0
- 00091 PRINT "Press RETURN if list is complete!"
- 00097 rem
- 00109 INPUT "Which structogram shall be printed "; Struktogramm$
- 00111 IF Struktogramm$="" goto 00115 else goto 00121
- 00115 rem
- 00117 goto 00130
- 00120 goto 00127
- 00121 rem
- 00123 Strukto$(Stzaehler)=Struktogramm$
- 00125 Stzaehler=Stzaehler + 1
- 00127 rem
- 00129 goto 00097
- 00130 rem
- 00137 PRINT "Filenames correct, continue program (y) ";
- 00139 INPUT Entscheidung$
- 00141 IF Entscheidung$<>"y" goto 00145 else goto 00151
- 00145 rem
- 00150 goto 00183
- 00151 rem
- 00155 gosub 00195
- 00163 FOR St=0 to Stzaehler-1
- 00173 Struktogramm$=Strukto$(St)
- 00175 PRINT "Printing : "; Struktogramm$
- 00177 gosub 00481
- 00179 next
- 00180 rem
- 00183 rem
- 00189 END
- 00194 end
- 00195 rem
- 00197 rem Satzladen
- 00209 PRINT "Loading : "; Zeichensatz$
- 00211 OPEN Zeichensatz$ FOR INPUT AS #2
- 00219 FOR T=0 TO 255
- 00231 High$(T)="" : Low$(T)=""
- 00239 FOR Q=1 TO Breite
- 00249 INPUT #2, High% : High$(T)=High$(T) + CHR$(High%)
- 00251 INPUT #2, Low% : Low$(T) =Low$(T) + CHR$(Low%)
- 00253 next
- 00254 rem
- 00257 next
- 00258 rem
- 00263 CLOSE #2
- 00271 return
- 00276 end
- 00277 rem
- 00279 rem PrLine
- 00293 Anzahl=LEN(B$) * Breite
- 00295 High=INT(Anzahl / 256) : Low=Anzahl - High * 256
- 00297 PRINT #1, CHR$(27);"A";CHR$(Verschiebung1);CHR$(27);CHR$(2);
- 00305 FOR F=1 TO Doppel
- 00317 PRINT #1, CHR$(13);CHR$(27);"L";CHR$(Low);CHR$(High);
- 00325 FOR T=1 TO LEN(B$)
- 00335 PRINT #1, High$(ASC(MID$(B$, T, 1)));
- 00337 next
- 00338 rem
- 00341 next
- 00342 rem
- 00347 PRINT #1, CHR$(10);
- 00355 FOR F=1 TO Doppel
- 00367 PRINT #1, CHR$(13);CHR$(27);"L";CHR$(Low);CHR$(High);
- 00375 FOR T=1 TO LEN(B$)
- 00385 PRINT #1, Low$(ASC(MID$(B$, T, 1)));
- 00387 next
- 00388 rem
- 00391 next
- 00392 rem
- 00401 return
- 00406 end
- 00407 rem
- 00409 rem SuLine
- 00421 Anzahl=LEN(B$) * Breite
- 00423 High=INT(Anzahl / 256) : Low=Anzahl - High * 256
- 00431 FOR F=1 TO Doppel
- 00443 PRINT #1, CHR$(13);CHR$(27);"L";CHR$(Low);CHR$(High);
- 00451 FOR T=1 TO LEN(B$)
- 00461 PRINT #1, Low$(ASC(MID$(B$, T, 1)));
- 00463 next
- 00464 rem
- 00467 next
- 00468 rem
- 00475 return
- 00480 end
- 00481 rem
- 00483 rem Struktogramm
- 00495 OPEN "LPT1" FOR OUTPUT AS #1
- 00497 OPEN Struktogramm$ FOR INPUT AS #2
- 00499 B$="" : ZH=0 : ME=0
- 00507 FOR T=1 TO 2
- 00517 rem
- 00529 A$=INPUT$(1, #2)
- 00537 IF A$=CHR$(13) goto 00541 else goto 00547
- 00541 rem
- 00543 goto 00554
- 00547 rem
- 00549 rem
- 00553 goto 00517
- 00554 rem
- 00555 next
- 00556 rem
- 00563 rem
- 00575 IF EOF(2) goto 00579 else goto 00597
- 00579 rem
- 00581 PRINT #1,CHR$(27);"A";CHR$(12);
- 00583 PRINT #1,CHR$(27);CHR$(2);
- 00585 PRINT #1,CHR$(13)
- 00587 PRINT #1,CHR$(27);CHR$(64);
- 00589 CLOSE #2
- 00591 CLOSE #1
- 00593 goto 00732
- 00596 goto 00729
- 00597 rem
- 00601 A$=INPUT$(1, #2)
- 00613 rem
- 00617 IF A$= CHR$(13) goto 00621 else goto 00661
- 00621 rem
- 00627 IF B$="" goto 00631 else goto 00637
- 00631 rem
- 00633 ME=0
- 00636 goto 00653
- 00637 rem
- 00641 gosub 00277
- 00647 B$=""
- 00649 ME=1
- 00653 rem
- 00657 goto 00725
- 00661 rem
- 00665 IF A$= CHR$(10) goto 00669 else goto 00705
- 00669 rem
- 00675 IF ME=1 goto 00679 else goto 00685
- 00679 rem
- 00681 gosub 00407
- 00684 goto 00689
- 00685 rem
- 00687 gosub 00277
- 00689 rem
- 00695 PRINT #1,CHR$(13);CHR$(10);
- 00697 B$=""
- 00701 goto 00725
- 00705 rem
- 00709 IF A$= CHR$(12) goto 00713 else goto 00721
- 00713 rem
- 00715 PRINT #1,CHR$(12);
- 00717 goto 00725
- 00721 rem
- 00723 B$=B$+A$
- 00725 rem
- 00729 rem
- 00731 goto 00563
- 00732 rem
- 00741 return