Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!ux1.cso.uiuc.edu!m.cs.uiuc.edu!estell From: estell@m.cs.uiuc.edu (John Estell) Newsgroups: comp.sys.apple2 Subject: Re: Stacks, Basic, and Onerr Message-ID: <1991Mar20.164430.14182@m.cs.uiuc.edu> Date: 20 Mar 91 16:44:30 GMT References: <9103191800.AA11676@apple.com> <9788@latcs1.oz.au> <1991Mar20.160105.14029@m.cs.uiuc.edu> Organization: University of Illinois, Dept. of Comp. Sci., Urbana, IL Lines: 29 bazyar@ernie (Jawaid Bazyar) writes: >>"Edward M. Moore" writes: >> I'm trying to design a program using gosubs. One of the sections is >> where I have a file-handeling (loading a shape table) from disk. I would >> like to use OnErr Goto in order to handle the error, but when that happens >> I loose my stack of gosubs. How can this be prevented? > I seem to recall there being a bug with Applesoft's error handling >routines that could cause it to forget the gosub stack in certain cases. A >few pokes correct the problem, but offhand I wouldn't know what they were Adapted from the Applesoft Basic Programming Reference Manual, p. 136: 10 FOR I=768 TO 777 : READ X : POKE I, X : NEXT 20 DATA 104, 168, 104, 166, 223, 154, 72, 152, 72, 96 "Establishes a machine-language routine at location 768, which can be used in an error-handling routine. Clears up some ONERR GOTO problems and ?OUT OF MEMORY ERROR messages. Use the command CALL 768 in the error- handling routine." Hope this helps. ------------------ NAME: John K. Estell USPS: CS Dept - Univ of Illinois, 1304 W. Springfield, Urbana, IL 61801 ARPA: estell@cs.uiuc.edu UUCP: ...!{uunet,harvard}!uiucdcs!estell VOICE: "Hi John!" QUOTE: CHR$(34)