home *** CD-ROM | disk | FTP | other *** search
- '------------------------------------------------------------------------------
- ' TITLE: segview
- ' DATE: March 11, 1991
- ' AUTHOR: R. Gonzalez
- '
- ' DESCRIPTION: Show segments stored in appropriate format by segmaker.
- ' Also demonstrates how to print graphics.
- '
- ' COMPILING: Remove STATIC declarations, uncomment indicated lines
- ' Check: Include MBPCs & MBLCs, Include runtime code, Make all arrays static,
- ' Use default window & menu, (if available: Generate 68020 & 68881 code).
- '
- ' (MODIFICATION HISTORY)
- ' DATE:
- ' AUTHOR:
- ' DESCRIPTION:
- '------------------------------------------------------------------------------
-
- 'MAIN
-
- DIM i%,no.segments%,seg.length%
- DIM seg$(100),filename$,junk$
-
- filename$ = FILES$(1,"TEXT")
- OPEN filename$ FOR INPUT AS #1
- INPUT #1, no.segments%
-
- FOR i% = 1 TO no.segments%
- INPUT #1, seg.length%
- seg$(i%) = INPUT$(seg.length%,#1)
- INPUT #1, junk$
- PICTURE ,seg$(i%)
- NEXT
-
- CLOSE #1
-
- LOCATE 1,1
- INPUT "Print results (y or n)";choice$
- IF choice$ = "y" OR choice$ = "Y" THEN
- OPEN "lpt1:prompt" FOR OUTPUT AS #2
- WINDOW OUTPUT #2
-
- FOR i% = 1 TO no.segments%
- PICTURE ,seg$(i%)
- NEXT i%
-
- CLOSE #2
- END IF
-
- END
-