My limited testing with the 'juxtapose' seemed to work, but I see it
does delay the record in more complicated testing, so I replaced it
with 'predselect'.

I'm not at all sure how 'lookup' can help here -- lookup looks for
equality, not "contains as a word".

This code works for me to search a single word. The limitation is that
x'00' cannot appear in "word", and will always be treated as a
word-separator, but I'm OK with that.

arg word .
if word = '' then exit 99

'CALLPIPE (endchar ?)',
'| *:',
'| fo: fanout',
'| p: predselect',
'| *.output.0:',
'? fo:',
'| xlate 1-* 00 40',
'| change anycase x'c2x(word) 'x00',
'| x: xlate',
'| specs / / 1 1-* n / / n',
'| l: locate x400040',
'| p:',
'? l:',
'| p:',
'| *.output.1:', /* If needed */
'? var xtable', /* Translate word separators to blank */
'| x:'

Examples of why I might want a word-separator:

In FORTRAN, search for A(I), even though () are word separators.
   (A(I)) is a hit, but (BA(I)) is not.
In text, search for 'the end', but not 'the endurance'.

Alan Ackerman
Alan (dot) Ackerman (at) Bank of America (dot) com

Reply via email to