--- In [email protected], "Ted Wall" <[EMAIL PROTECTED]> wrote:
>
> If you use: (Applies escape character processing based on c to string)
> s = esc(?+string+,?+c+)
Hmm. My problem is this: Here's example from DDE, but aplies to
any/all plugins that allow callbacks.
Suppose dde wants to callback with a string that contains
newlines. dde doesn;t know the name of a variable, all it knows is
some script to invoke, with the result string as an argument. I tell
user to provide callback definition in this form
?$.scriptname("#")$
and I'll stick the result in the place where I encounter the insertion
point, namely #.
But if I put an actual newline in beetween quotes, and send command
back to PowerPro, pp sees two lines, not one.
So, if I can substitute \n \r (and \x00 while I'm at it) I can sneak
the string in as a callback arg.
But for that I need the esc char.
Other suggestions?
> eg. LOCAL CRLF= ESC(?"\r\n", ?"\")
>
> Then, I haven't found a reason to know a user's esc char.
>
>
> But to answer your question could use:
>
> LOCAL e, NL= ESC(?"\n", ?"\")
>
> FOR(LOCAL i= 2; i<256; i= i +1)
>
> IF(i!=34)DO
> e= EVAL(??"?++ ESC(?"\d"++FILL("000",i)++ "n", ??\?)++ ??"?)
>
> IF(e==NL)
> BREAK
>
> ENDIF
> ENDFOR
>
> IF(i==256)DO
>
> WIN.Debug(?+No Escape character exists: "EXEC QuoteEscape OFF"+)
>
> ELSE
>
> e=ESC(?"\d"++ FILL("000", i), ??\?)
> WIN.Debug(?"Escape char= \d"++ FILL("000", i)++ " == " ++e)
>
> ENDIF
Nice, but I was hoping for something simpler. Maybe Bruce can gimme
another ppsv func.
>
> Ted
>
> --- In [email protected], "entropyreduction" wrote:
> >
> > I realise I've been hardcoding backslash as escape character in
> > various plugins. Any way to find out what the actual one is?
> >
>
Attention: PowerPro's Web site has moved: http://www.ppro.org
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/power-pro/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/