This method works to search for a user's escape char:
; FindEscapeChar.powerpro
LOCAL NL, c
FOR(LOCAL i= 2; i<256; i++)
IF(i!=34)DO
NL= EVAL(??"?++ ESC(?"\d"++ FILL("000", i)++ "n", ??\?)++ ??"?)
IF(NL==ESC(?"\n", ?"\"))
BREAK
ENDIF
ENDFOR
IF(i!=256)DO
c= ESC(??\d?++ FILL("000", i), ??\?)
WIN.DebugShow("Escape char= "++ c++ ;;+
" == "++ c++ "d"++ FILL("000", i)++ ?" = "++ c++ ;;+
"x"++ FILL("00", WIN.Hex(i)))
ELSE
WIN.DebugShow(?#No Escape character exists: "*EXEC QuoteEscape OFF"#)
ENDIF
QUIT(c)
Ted
--- In [email protected], "entropyreduction" wrote:
>
> --- In [email protected], "brucexs" <bswitzer@> wrote:
> >
> > >
> > > I guess there's not an expression I can evaluate to get
> > > user's esc character?
> > >
> > NO, that would be too easy.
>
> > BTW, note that ?\02....\02
> > will work for any string that does not contain \02. That is
> > the trick PowerPro uses in similar circumances.
>
> But not useful if you want escaping to work within string?
>
> Getting user to specify escape character is good. I can make it
> an ini file setting for pipe plugin (assuming users rarely
> change escape character in their config), and yet another
> parameter to 2pp2.exe