Alex wrote: > I have come across some weird behaviour. > Please observe the following code:
> Win.Debug(1) > Win.Debug(&(1)) > Both lines are quite impractical, however neither > should result in an error. The second line causes > PowerPro to complain about a missing right parenthesis. I don't understand your problem with that result. To me, all the results I get from using win.debug correctly seem correct. OK, you have demonstrated that it is possible to get "weird behaviour" if you feed it weird input (garbage in, garbage out). IMHO it is unfair to expect PowerPro to cope with every possible weird input. If Bruce had to make it foolproof, it would result in: - fewer features - a larger exe - he would have to spend more time testing all possible silly inputs, even though the program is free. As you know, Win.debug(expr) expects an expression. This is not an expression: &(anything) It is a literal. That's because the purpose of &() is to convert an expression into a literal; it is for using in places where literal text is expected but you want to enter (the resolved result of) an expression. So using &() inside win.debug() is your first mistake. Your other mistake is placing the digit: 1 alone inside &(). A single digit is not an expression. A single alphabetic char (like "a") can be an expression (it might be an undeclared variable) but a variable cannot be or start with a digit. So I would expect: win.debug(a) to print a blank line in the debug window -- which it does, because I didn't previously give the variable "a" any value so it is an empty string. But this: win.debug(&(a)) produces an error message "expecting an expression". Again, that is correct. When I put the variable called "a" inside &() it is no longer an expression which is sent to win.debug, it is a literal. Seems to me, the only part of your complaint which is even vaguely valid is about the content of the error message. But the error message is actually more truthful than your misquote. You state that the error message is "about a missing right parenthesis". That is not the complete truth. In fact the error message from: win.debug(&(1)) is: "Bad expression: check parenthesis or extra characters at end win.debug(1 " In that message, the only statement, "Bad expression", is true. That statement is followed by two suggestions as to possible reasons why you got a "bad expression" error message. To say "check this or that" is not to say "this *is* the cause of the problem". It is to say "here are a couple of things which *might* be the cause of a 'bad expression' error" Conclusion: when PowerPro is fed a bad expression it tells you so. It also gives you a tip, but it doesn't give you an analysis of why that particular non-expression is bad. Fair enough IMHO. Why on earth should Bruce be expected to expand (bloat?) the error response routines so they can do a detailed analysis of all possible garbage it might be fed. The simple answer to the "problem" is to use win.debug(expr) correctly and use &(expr) correctly, instead of using both of them incorrectly at the same time and expecting PowerPro to write to you with a detailed explanation about any particular unexpected stuff you might send it. Alan Martin ------------------------ Yahoo! Groups Sponsor ---------------------~--> Yahoo! Domains - Claim yours for only $14.70 http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/JV_rlB/TM ---------------------------------------------------------------------~-> 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/
