Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!mit-eddie!uw-beaver!tektronix!reed!kamath From: kamath@reed.UUCP (Sean Kamath) Newsgroups: comp.sys.apple Subject: Re: RESCUE SQUAD Message-ID: <7106@reed.UUCP> Date: Tue, 8-Sep-87 16:48:21 EDT Article-I.D.: reed.7106 Posted: Tue Sep 8 16:48:21 1987 Date-Received: Thu, 10-Sep-87 05:29:45 EDT References: <1177@dasys1.UUCP> Reply-To: kamath@reed.UUCP (Sean Kamath) Organization: Reed College, Portland OR Lines: 105 Keywords: Help Column, A+, by Gary B. Little In article <1177@dasys1.UUCP> patth@dasys1.UUCP (Patt Haring) writes: >APPLESOFT AS TEXT FILE >A. Unlike some dialects of BASIC for other comptuers, neither >Applesoft not its BASIC.SYSTEM ProDOS interface has a command >for saving a program to disk as lines of readable text. When nor DOS 3.3 >you use the Save command, the program is stored in a compressed, >tokenized form in a BAS file, a form that only the Applesoft >interpreter understands. To convert the program to text form, >you must first create a text file called BAS.TO.TXT that >contains the following three lines: YOu don't *have* to! >?"Transferring program to 'BASIC.TXT'" > >0 D$=CHR$(4): ?D$;"OPENBASIC.TXT": > ?D$;"CLOSE": ?D$;"DELETEBASIC.TXT": > ?D$;"OPENBASIC.TXT": > ?D$;"WRITEBASIC.TEXT":?"NEW":LIST 1,63999: ---------------^ > ?D$;"CLOSE":END >RUN If you do that, you will end up with two files, one of which is still open. Remove to e from test in that line. >You can use a word-processing program to create this file, but >be sure to save it to disk as a text file. To convert your >Applesoft program to text, load it into memory and then enter >the command BAS.TO.TXT. Note that if you create the above text file, you cannot "enter the command BAS.TO.TXT" rather "-BAS.TO.TXT". I think it is a much better thing to do it manually. I don't like running the above, because A) you might have a line 0 in the program, and B) you end up with two open files at once, which I like to avoid. It is possible that things might get swizzeled and you can only have 1 open. Also, note that this leaves you with a modified BASIC program. I like this method: find last line. 63000 d$=chr$(4):?d$"openfile":?d$"deletefile":?d$"writefile":list,62999 :?d$"closefile" goto 63000. Amoung other things, you can tailer it to the task at hand, such as listing only sectiones you want, and changing file name. Also, note that the close and second open are not necesarry, as a write opens the file if it is not openned already (I KNOW DOS 3.3 does this, and I have heard ProDOS does it do.). >-- >Patt Haring UUCP: ..cmcl2!phri!dasys1!patth >Big Electric Cat Compu$erve: 76566,2510 >New York, NY, USA MCI Mail: 306-1255; GEnie: PHaring I don't usually like to rag on the magazine people, as I know they have certain restrictions. But sometimes they are just plain _wrong_. Recently, in an InCider+, in an article about creating a blank checkbook template (is there any other kind? My mistake :-) for appleworks, the author responded to the fact that one section of the spreadsheet wouldn't calculate correctly because (I quote) " Recalculation was so fast that the formula in E43 didn't have a chance to copy the closing balance from I29, which sometimes happens with AppleWorks. The solution is the calculate again, so press OA-K." Now, come _*ON*_ folks!!!!! To "fast" for the computer? Jeez. Think I'm nitpicking? You say, so what, _we_ know it's the method of calculation here, and that specifying new calculation rules (just like the manual explains!) fixes this. But the points are A) A lot of new users read this, and it leads to misunderstandings, and B) it happens all over the place in these mags, and they rarely correct this type of error. I've seen these errors done by Roger Wagner, Mr. Little, and other people who probably know better, and are told not to go far into detail. I subscribe to these magazines almost more out of habbit than because I value their ideas, which is sad. Today, it seems that more people are worried about AppleWorks templates and dialing "on-line" than using them. I realize that a _lot_ of people use Apples with AppleWorks, I do! But I also program. I _like_ to program. But these days computers are just tools. They always have been, but you really need to understand how a tool is created, or at least the theory of how it works, to really use it, and understand it's limitations. "too fast" calculation is a perfect example. If the woman had ever written a line of code that did anything remotely similar to a spreadsheet, she would realize this, or at least do a little more to question it than say it was "too fast". Or maybe she just didn't have the space. Well, enough of my diatribe. I think you get the point. It's sad. Sean Kamath -- UUCP: {decvax allegra ucbcad ucbvax hplabs ihnp4}!tektronix!reed!kamath CSNET: reed!kamath@Tektronix.CSNET || BITNET: reed!kamath@Berkeley.BITNET ARPA: tektronix!reed!kamath@Berkeley reed!kamath@hplabs US Snail: 3934 SE Boise, Portland, OR 97202 (I hate 4 line .sigs!)