Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.apple2.programmer > #3801

Re: Basic does not clear file on open

Newsgroups comp.sys.apple2.programmer
Date 2017-08-13 14:30 -0700
References <7f4283eb-c227-463c-af9e-0d62fc07146b@googlegroups.com> <eb15db23-21b1-4bb8-a757-14af918ca871@googlegroups.com> <d31c71bf-07ed-40a8-a808-1a637c25d2e4@googlegroups.com> <9e0bbfd7-a65e-42a7-a337-5e35853c091b@googlegroups.com> <omp7ia$1q79$1@gioia.aioe.org>
Message-ID <aa9ff003-43b1-4ff5-8534-c19b4d7f97f3@googlegroups.com> (permalink)
Subject Re: Basic does not clear file on open
From John Brooks <jbrooks@blueshiftinc.com>

Show all headers | View raw


On Sunday, August 13, 2017 at 2:53:17 AM UTC-7, Brian Patrie wrote:
> > The VERIFY will succeed but the DELETE will cause the ONERR to trigger.
> 
> This is one of the reasons that i prefer the OPEN,DELETE,OPEN method; it 
> will err for more relevant reasons--including a type mismatch.  I also 
> just plain hate trapping errors; AppleSoft's error trap plumbing is 
> clumsy, even before having to deal with its bugs.  (Would RESUME NEXT 
> have been too much to ask for?)
> 
> On that note, it would be really sweet if there was a mode (perhaps 
> invoked by a special prefix to a DOS command) wherein errors, instead of 
> stopping the programme, would just set the error code.  Then error 
> trapping could be almost as easy as it is in unixoid shell scripts.
> 
> e.g.
> 
> 42 PRINT D$ ".OPEN" F$ : IF PEEK(222)>0 THEN PRINT "Unable to open " F$ 
> : END

It would be easy to delete files using a small assembly routine which called the ProDOS MLI and returned an error code.

BTW: Seems like the sequence should be unlock, then delete unless you want prevent locked files from being deleted.

-JB
@JBrooksBSI

Back to comp.sys.apple2.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Basic does not clear file on open Bill Chatfield <billchatfield1@gmail.com> - 2017-08-11 07:58 -0700
  Re: Basic does not clear file on open Michael J. Mahon <mjmahon@aol.com> - 2017-08-11 11:33 -0500
    Re: Basic does not clear file on open Bill Chatfield <billchatfield1@gmail.com> - 2017-08-11 10:50 -0700
  Re: Basic does not clear file on open James Davis <JPD.Enterprises@outlook.com> - 2017-08-11 09:38 -0700
  Re: Basic does not clear file on open gids.rs@sasktel.net - 2017-08-11 13:38 -0700
    Re: Basic does not clear file on open Bill Chatfield <billchatfield1@gmail.com> - 2017-08-11 14:01 -0700
      Re: Basic does not clear file on open gids.rs@sasktel.net - 2017-08-11 23:41 -0700
        Re: Basic does not clear file on open gids.rs@sasktel.net - 2017-08-11 23:51 -0700
    Re: Basic does not clear file on open Michael J. Mahon <mjmahon@aol.com> - 2017-08-11 18:57 -0500
    Re: Basic does not clear file on open ewerst@msn.com - 2017-08-12 07:54 -0700
      Re: Basic does not clear file on open ewerst@msn.com - 2017-08-12 08:00 -0700
        Re: Basic does not clear file on open gids.rs@sasktel.net - 2017-08-12 12:29 -0700
          Re: Basic does not clear file on open ewerst@msn.com - 2017-08-13 09:11 -0700
            Re: Basic does not clear file on open Michael J. Mahon <mjmahon@aol.com> - 2017-08-13 13:40 -0500
            Re: Basic does not clear file on open gids.rs@sasktel.net - 2017-08-13 16:41 -0700
              Re: Basic does not clear file on open gids.rs@sasktel.net - 2017-08-13 16:58 -0700
              Re: Basic does not clear file on open ewerst@msn.com - 2017-08-13 19:08 -0700
                Re: Basic does not clear file on open gids.rs@sasktel.net - 2017-08-14 07:46 -0700
        Re: Basic does not clear file on open Brian Patrie <bpatrie@bellsouth.spamisicky.net> - 2017-08-13 04:53 -0500
          Re: Basic does not clear file on open John Brooks <jbrooks@blueshiftinc.com> - 2017-08-13 14:30 -0700
            Re: Basic does not clear file on open Brian Patrie <bpatrie@bellsouth.spamisicky.net> - 2017-08-14 18:33 -0500
          Re: Basic does not clear file on open gids.rs@sasktel.net - 2017-08-13 16:49 -0700
            Re: Basic does not clear file on open Brian Patrie <bpatrie@bellsouth.spamisicky.net> - 2017-08-14 18:43 -0500
              Re: Basic does not clear file on open Bill Chatfield <billchatfield1@gmail.com> - 2017-08-15 06:13 -0700
                Re: Basic does not clear file on open gids.rs@sasktel.net - 2017-08-15 13:22 -0700
                Re: Basic does not clear file on open Bill Chatfield <billchatfield1@gmail.com> - 2017-08-15 13:26 -0700
                Re: Basic does not clear file on open Antoine Vignau <antoine.vignau@laposte.net> - 2017-08-15 13:48 -0700
                Re: Basic does not clear file on open Bill Chatfield <billchatfield1@gmail.com> - 2017-08-16 06:08 -0700

csiph-web