Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeder2.ecngs.de!ecngs!feeder.ecngs.de!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail NNTP-Posting-Date: Thu, 14 Jul 2011 07:56:29 -0500 From: "Ste (news)" Subject: Re: Searching with !Zap Newsgroups: comp.sys.acorn.programmer Date: Thu, 14 Jul 2011 13:56:26 +0100 Message-ID: <51f2abd5ffsteve@revi11.plus.com> References: <7f479af151.martin@bach.planiverse.com> <9198cbf151.cferris@cferris.freeuk.com> User-Agent: Pluto/3.04d (RISC-OS/5.11) NewsHound/v1.50-32 Organization: None Lines: 58 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-hKylRoFQ0oMnWeCS8exgFpVHgYcpDkOVQBTV1xMZmKIyShfyxkO9Ya8hpj8MeD2m1xxTjcm/UXADbiu!2dunDoVzhB/+RKFXC/DTLlV0KvkvtCKiAtIW4RgnMFKA1zVcNh8B9JnQf3XYoGp3/2ZIvWMPRinQ!sQ== X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2805 Xref: x330-a1.tempe.blueboxinc.net comp.sys.acorn.programmer:562 In article , Martin Wuerthner wrote: > In message <9198cbf151.cferris@cferris.freeuk.com> > cferris@freeRemoveuk.com.invalid wrote: > > In message <7f479af151.martin@bach.planiverse.com> > > Martin Wuerthner wrote: > >> In message > >> 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.