home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
sourcecode
/
subroutines
/
ascii_print.amos
/
ascii_print.amosSourceCode
Wrap
AMOS Source Code
|
1978-01-05
|
1KB
|
84 lines
' *******************
' *** ASCII PRINT ***
' *******************
' *** This routine prints out an ASCII text file, with page numbering.
' *** Open screen.
Screen Open 0,640,200,2,Hires
Curs Off
Flash Off
Cls 0
Palette $0,$FFC
' *** Select file.
F$=Fsel$("","","PRINT ASCII FILE")
If F$=""
Screen Close 0
Direct
End If
' *** Open file.
Set Input 10,-1
Open In 1,F$
' *** Set page line-length.
ML=55
' *** Reset variables.
L=1
PG=1
' *** Print file.
While Not Eof(1)
Line Input #1,A$
Lprint A$
Print Mid$(A$,1,80)
Inc L
' *** If end of page, print page number.
If L>=ML
Lprint
Lprint
Lprint
Lprint "*** PAGE :"+Str$(PG)+" ***"
Lprint Chr$(12)
PG=PG+1
L=1
End If
Wend
' *** Close file.
Close
' *** Print final page number.
If L<ML
For A=L To ML
Lprint
Next A
Lprint "*** PAGE :"+Str$(PG)+" ***"
Lprint Chr$(12)
End If
' *** Quit.
Direct