So I upgraded to the latest and greatest PowerPro, after so long sticking
to an old version. Very impressed by the new help file. I found a tiny
mistake, BTW. The "Expressions" page says: 

"escape character
You use the character \ as an escape character in strings in expressions.
First, gray check Use quote ' for escape in expression strings (gray
backslash) on Setup >Advanced >Characters."

But I open Setup >Advanced >Characters and see no "Use quote ' for escape
in expression strings" option. Not with that wording. That might confuse
people like me.

********

So I "migrated" to the new escape character, our dearest and beloved
inverted slash. After a considerably painful search and replace operation
and long debugging session with many PowerPro crashes, everything finally
seems to work OK. But a few things escape me:

1 - The manual says:

"Then you can use the following sequences in PowerPro strings.
[...]
\&      expression follows character (replace & by whatever character you use)"

What does that mean? \& is the new "expression follows" character (now a
string)? My "expression follows" character still is & and everything works
normally. I shrug.


2 - I try this command:

myChoice = "one line, \n two lines, \n three lines"
Note Open pos 0 0 text 16777215 back 12615680 size 800 550 settext
"&(myChoice)"

A note pops up. I expect to see...

"one line, 
 two lines, 
 three lines"

... but I see...

"one line, [] two lines, [] three lines"

I am using brackets here [], but what I actually see is a character that is
often used by Windows when it cannot print some character. If I copy that
and paste it into my text editor, they become newlines as expected. But it
seems that the Note cannot display the newlines. Could that be a bug in
Notes?


3 - Testing the Regex plug-in:

myChoice = "one line, two lines, three lines"
Regex.Match (myChoice, "(,.*h)", "\\1", "myMatch1")
Regex.Replaceg (myChoice, ",", "\\n", "myMatch2")
myChoice = "&(myMatch1) \n\n----------------\n\n&(myMatch2)"
Note Open pos 0 0 text 16777215 back 12615680 size 800 550 settext
"&(myChoice)"


A note pops up. I expect to see...

", two lines, th []----------------[]one line\n two lines\n three lines"

... but I see...

", two lines, th []----------------[]one line[] two lines[] three lines"


In my view, turning the variable &(myMatch2) into text is evaluation. And
so is turning "\n" into a newline. Since "\n" is in a variable that is
evaluated too, it seems to me that PowerPro is incurring in double
evaluation.

The manual page "Expression Follows character" seems to confirm that. See
the "limitations" paragraph and the var = "a"quote" example.

Is that correct? Should PowerPro do that? What does the group think?

Thank you for your comments.

-- 
Luciano Espirito Santo
Santos, SP - Brasil



------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/JV_rlB/TM
--------------------------------------------------------------------~-> 

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/
 



Reply via email to