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


Groups > comp.sys.acorn.programmer > #547 > unrolled thread

Searching with !Zap

Started bycferris@freeRemoveuk.com.invalid
First post2011-07-12 11:07 +0100
Last post2011-07-14 13:56 +0100
Articles 5 — 3 participants

Back to article view | Back to comp.sys.acorn.programmer


Contents

  Searching with !Zap cferris@freeRemoveuk.com.invalid - 2011-07-12 11:07 +0100
    Re: Searching with !Zap Martin Wuerthner <spamtrap@mw-software.com> - 2011-07-12 13:08 +0200
      Re: Searching with !Zap cferris@freeRemoveuk.com.invalid - 2011-07-12 21:07 +0100
        Re: Searching with !Zap Martin Wuerthner <spamtrap@mw-software.com> - 2011-07-12 23:58 +0200
          Re: Searching with !Zap "Ste (news)" <steve@revi11.plus.com> - 2011-07-14 13:56 +0100

#547 — Searching with !Zap

Fromcferris@freeRemoveuk.com.invalid
Date2011-07-12 11:07 +0100
SubjectSearching with !Zap
Message-ID<d5b494f151.cferris@cferris.freeuk.com>
Is it possible to search with !Zap (BASIC or Text) for two lines that
match below :-

*****
=0
=0
*****

Thanks
-- 
Colin Ferris Cornwall UK

[toc] | [next] | [standalone]


#548

FromMartin Wuerthner <spamtrap@mw-software.com>
Date2011-07-12 13:08 +0200
Message-ID<7f479af151.martin@bach.planiverse.com>
In reply to#547
In message <d5b494f151.cferris@cferris.freeuk.com>
          cferris@freeRemoveuk.com.invalid wrote:

> Is it possible to search with !Zap (BASIC or Text) for two lines that
> match below :-

> *****
> =0
> =0
> *****

Yes, tick "Raw" and search for "=0\n=0\n"

-- 
Martin
---------------------------------------------------------------------
Martin Wuerthner         MW Software      http://www.mw-software.com/
        RISC OS Software for Design, Printing and Publishing
---------------------------------------------------------------------

[toc] | [prev] | [next] | [standalone]


#550

Fromcferris@freeRemoveuk.com.invalid
Date2011-07-12 21:07 +0100
Message-ID<9198cbf151.cferris@cferris.freeuk.com>
In reply to#548
In message <7f479af151.martin@bach.planiverse.com>
          Martin Wuerthner <spamtrap@mw-software.com> wrote:

> In message <d5b494f151.cferris@cferris.freeuk.com>
>           cferris@freeRemoveuk.com.invalid wrote:
> 
> > Is it possible to search with !Zap (BASIC or Text) for two lines
> > that match below :-
> 
> > *****
> > =0
> > =0
> > *****
> 
> Yes, tick "Raw" and search for "=0\n=0\n"
> 

Thanks Martin for that info - works with Text but not BASIC.

-- 
Colin Ferris Cornwall UK

[toc] | [prev] | [next] | [standalone]


#552

FromMartin Wuerthner <spamtrap@mw-software.com>
Date2011-07-12 23:58 +0200
Message-ID<bbc8d5f151.martin@bach.planiverse.com>
In reply to#550
In message <9198cbf151.cferris@cferris.freeuk.com>
          cferris@freeRemoveuk.com.invalid wrote:

> In message <7f479af151.martin@bach.planiverse.com>
>           Martin Wuerthner <spamtrap@mw-software.com> wrote:

>> In message <d5b494f151.cferris@cferris.freeuk.com>
>>           cferris@freeRemoveuk.com.invalid wrote:
>> 
>>> Is it possible to search with !Zap (BASIC or Text) for two lines
>>> that match below :-
>> 
>>> *****
>>> =0
>>> =0
>>> *****
>> 
>> Yes, tick "Raw" and search for "=0\n=0\n"
>> 

> Thanks Martin for that info - works with Text but not BASIC.

Ah, you mean BASIC mode. I use BASTXT mode for editin BASIC, and the 
above search works in that mode.

-- 
Martin
---------------------------------------------------------------------
Martin Wuerthner         MW Software      http://www.mw-software.com/
        RISC OS Software for Design, Printing and Publishing
---------------------------------------------------------------------

[toc] | [prev] | [next] | [standalone]


#562

From"Ste (news)" <steve@revi11.plus.com>
Date2011-07-14 13:56 +0100
Message-ID<51f2abd5ffsteve@revi11.plus.com>
In reply to#552
In article <bbc8d5f151.martin@bach.planiverse.com>,
   Martin Wuerthner <spamtrap@mw-software.com> wrote:
> In message <9198cbf151.cferris@cferris.freeuk.com>
>           cferris@freeRemoveuk.com.invalid wrote:
> > In message <7f479af151.martin@bach.planiverse.com>
> >           Martin Wuerthner <spamtrap@mw-software.com> wrote:
> >> In message <d5b494f151.cferris@cferris.freeuk.com>
> >>           cferris@freeRemoveuk.com.invalid wrote:
> >> 
> >>> Is it possible to search with !Zap (BASIC or Text) for two lines
> >>> that match below :-
> >> 
> >>> *****
> >>> =0
> >>> =0
> >>> *****
> >> 
> >> Yes, tick "Raw" and search for "=0\n=0\n"
> >> 
>
> > Thanks Martin for that info - works with Text but not BASIC.
>
> Ah, you mean BASIC mode. I use BASTXT mode for editin BASIC, and the 
> above search works in that mode.

In BASIC mode, you need to know something about the format of tokenised
BASIC programs because you're doing a raw search in Zap, so it's also
searching some of the (invisible) tokens. You also need to know BASIC uses a
CR "\r" rather than an LF "\n" for line endings.

So you need to skip the three bytes at the start of the second line, which
you don't care about, by searching for:

  "=0\r\o\o\o=0"

This is very limited, because if part of what you're searching for is a
BASIC keyword (e.g. REM) then you need to search for the character
representing the tokenised keyword, e.g.

  "=0\r\o\o\oREM"

won't find this sequence:

  =0
  REM

because the REM is actually stored as the byte &F4, so you really need to
search for:
  
  "=0\r\o\o\o\&f4"

In summary, doing a 'raw' search in BASIC mode is of limited value.

Steve

-- 
Steve Revill @ Home
Note: All opinions expressed herein are my own.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.sys.acorn.programmer


csiph-web