Newsgroups: comp.sys.apple2
Path: news.weeg.uiowa.edu!news.uiowa.edu!uunet!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewse!cbnewsd!bird
From: bird@cbnewsd.cb.att.com (j.l.walters)
Subject: BASIC to a text file
Organization: AT&T
Date: Mon, 24 Aug 1992 22:46:31 GMT
Message-ID: <1992Aug24.224631.23339@cbnewsd.cb.att.com>
Lines: 37

Several times recently I've seen question on the net on how to save a
BASIC program as a text file. The answers I've seen always work, however,
I think this version is a bit easier to use. In any case, some version of
this needs to be added to the FAQ.

There are two versions:


A. This is the version one would normally use. Note that the following
   has to be entered as a single line in a text file. To use it you load 
   the BASIC program, change to the subdirectiory that contains the
   following in a text file i.e. AS2TXT0, and type:

   1. EXEC AS2TXT0
   2. RUN

   Answer with the name of the file you want the BASIC program saved to
   as a text file.

0 D$ =  CHR$ (4): INPUT "FILE NAME?";A$: PRINT D$"OPEN"A$:
PRINT D$"WRITE"A$: LIST 1 - : PRINT D$"CLOSE": END


B. Use this version if the BASIC program you are trying to save has
   a line numbered 0. Its "name" is AS2TXT9 for this example.

   1. EXEC AS2TXT9
   2. RUN  63999

63999 D$=CHR$(4):INPUT "FILE NAME?";A$:PRINT D$"OPEN"A$:
PRINT D$"WRITE"A$:LIST 0,62998:PRINT D$"CLOSE"A$

-- 


				Joe Walters att!ihlpw!bird   
				IH 2A-227 (708) 979-9527
