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


Groups > comp.sys.acorn.programmer > #1572

Re: Merging three files together?

From Steve Drain <steve@kappa.me.uk>
Newsgroups comp.sys.acorn.programmer
Subject Re: Merging three files together?
References <f08f977952.rogerarm@rogerarm.freeuk.com> <RG%dr.29350$4z7.11783@fx08.am4> <19a7047a52.rogerarm@rogerarm.freeuk.com>
Message-ID <HCfer.116693$xD4.69075@fx06.am4> (permalink)
Organization virginmedia.com
Date 2012-04-02 11:56 +0100

Show all headers | View raw


On 02/04/2012 09:33, Roger Darlington wrote:
> OK, thanks Steve.
>
> Would a MERGE command or CONCATENATE command be a suitable candidate
> for inclusion in your BASALT BASIC extension?
>
> I seem to remember that even HP BASIC has a MERGE command, which will
> merge files together.

I do not think BASIC should provide keywords that are exclusively for 
the filer. I imagine that HP BASIC was doing the job of our *commands.

If you want a neater filer method, you could take Martin's suggestion 
and alias it. Run an Obey file:

   Set Alias$Merge "Print %%0 { >> %%1 }"

Then you can use this, in an OSCLI construct if you want:

   *Create Newfile
   *Merge Header Newfile
   *Merge Middle Newfile
   *Merge Footer Newfile

As an aside, I have written an extended BGET/BPUT pair that work with 
multiple bytes, so they hide this:

   SYS"OS_GBPB",4,add%,END,256 TO ,,,not%
   SYS"OS_GBPB",2,new%,END,256-not%

in this:

   BGET#add%,END,256 TO not%
   BPUT#new%,END,256-not%

Steve

Back to comp.sys.acorn.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Merging three files together? Roger Darlington <rogerarm@freeuk.com> - 2012-04-01 13:42 +0100
  Re: Merging three files together? Steve Drain <steve@kappa.me.uk> - 2012-04-01 17:48 +0100
    Re: Merging three files together? Roger Darlington <rogerarm@freeuk.com> - 2012-04-02 09:33 +0100
      Re: Merging three files together? Steve Drain <steve@kappa.me.uk> - 2012-04-02 11:56 +0100
  Re: Merging three files together? Martin Bazley <martin.bazley@blueyonder.co.uk> - 2012-04-01 21:53 +0100
    Re: Merging three files together? Roger Darlington <rogerarm@freeuk.com> - 2012-04-02 09:28 +0100

csiph-web