Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site aecom.UUCP Path: utzoo!linus!philabs!aecom!werner From: werner@aecom.UUCP (Craig Werner) Newsgroups: net.micro.pc,net.micro Subject: Source for Wordstar Converting Program Message-ID: <1368@aecom.UUCP> Date: Sun, 14-Apr-85 17:23:12 EST Article-I.D.: aecom.1368 Posted: Sun Apr 14 17:23:12 1985 Date-Received: Tue, 16-Apr-85 04:06:38 EST Distribution: na Organization: Albert Einstein Coll. of Med., NY Lines: 42 Xref: linus net.micro.pc:3331 net.micro:8697 The following is a short simple program to convert Wordstar Document files to Non-Document (in cases where no Control characters are embedded, this means ASCII) files. It's in BASIC because since BASIC comes with MS-DOS, I assume everybody has it. Also, it was there. ----------------------------- cut here ------------------------------------- 1 KEY OFF 5 CLS 10 'Another attempt at WSPATCHING 15 'Craig Werner (werner@aecom.UUCP) 1935-14E Eastchester Rd. Bronx NY 10461 20 INPUT "Filename to convert"; FINAME$ 21 IF RIGHT$(FINAME$,3) <> "hrd" THEN GOTO 30 23 PRINT "Cannot convert a filename with extension '.hrd' -Sorry." 25 INPUT "type 'Q' to quit, any key to retry.";Q$ 27 IF (Q$="Q")OR (Q$="q") THEN GOTO 1000 ELSE GOTO 20 30 OPEN "R",1,FINAME$,1 : FIELD #1, 1 AS A$ 31 OPEN "R",2,FINAME$+".hrd",1 : FIELD #2, 1 AS B$ 35 REC = 1 36 PRINT "Length" ; LOF(1) 40 WHILE NOT EOF(1) 50 GET #1, REC 51 IF ASC(A$) = 26 THEN GOTO 65 'Control-Z = 26. 55 LET C$ = CHR$(ASC(A$) AND 127) 60 IF ASC(C$) <> 10 THEN PRINT C$; 61 LSET B$=C$ : PUT #2, REC 65 LET REC = REC + 1 70 WEND 80 CLOSE #1 : CLOSE #2 1000 END ------------------------------- cut here too --------------------------------- If anyone decides to embellish this I would appreciate getting the modified source. Otherwise, feel free to use it. -- Craig Werner !philabs!aecom!werner What do you expect? Watermelons are out of season!