BBS: Inland Empire Archive Date: 07-02-92 (15:18) Number: 2127 From: CORIDON HENSHAW Refer#: NONE To: THOMAS HEAD Recvd: NO Subj: Message upload preparer ( Conf: (2) Quik_Bas
After awaking from a long sleep, Thomas Head, when seeing the ulgy form of Coridon Henshaw, rose and stated: TH> > Have you ever wished for a program to break up any TH> > text file into 100 line segments, for posting as TH> > messages? Well here such a program is. TH> modify it a little and write a program that will make any text file TH> printer aware. "Printer aware"? Do you mean TRUE (7-bit) ASCII? I have some code for a translation table that meight help: ----Cut Here---- DEFINT A-Z COLOR 14, 1 CLS RESTORE DIM CharTable(255) AS STRING FOR X = 65 TO 116 + 6 READ CharTable(X) NEXT LINE INPUT "Enter Source File: ", Source$ LINE INPUT "Enter Target File: ", Target$ OPEN Source$ FOR BINARY ACCESS READ LOCK WRITE AS #1 LEN = 32767 OPEN Target$ FOR BINARY ACCESS WRITE LOCK READ AS #2 LEN = 32767 Length@ = LOF(1) Start@ = TIMER CLS PRINT "Char number: of: InChar: OutChar:" LOCATE 1, 25 PRINT Length@; FOR Total@ = 1 TO LOF(1) SEEK 1, Total@ InChar$ = INPUT$(1, 1) IF ASC(InChar$) < 65 OR ASC(InChar$) > 122 THEN OutChar$ = InChar$ ELSE OutChar$ = CharTable(ASC(InChar$)) END IF LOCATE 1, 13 PRINT Total@; LOCATE 1, 42 PRINT InChar$ LOCATE 1, 53 PRINT OutChar$ + " " PUT #2, , OutChar$ IF INKEY$ = "q" OR INKEY$ = "Q" THEN EXIT FOR NEXT PRINT "Done - took "; RTRIM$(LTRIM$(STR$(TIMER - Start@))); " Seconds" CLOSE DATA ,α,,D,ξ,F,G,Γ΄,,υ,K,L,M,₯,,P,Q,R,$,T,,V,W,X,Y,Z DATA [,\,],^,_,` DATA ,b,,d,,f,g,ΓΏ,,j,k,l,m,€,,p,q,r,s,t,u,v,w,x,ζ,z ----Cut Here---- --- msgedsq 2.0.5 * Origin: -=- Point Blank -=- I'mmmmmm Baaaack! -=- (1:250/804.200)
Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET