Post Reply 
Somewhere between a bug or feature:
11-14-2014, 12:35 PM
Post: #7
RE: Somewhere between a bug or feature:
[Entry Line] ................................ [History Screen]
b:=x^2;

I.) a:=b|x=2; ---> x^2 .......... (a:=b)|x=2 ----------- x^2

II.) a:=(b|x=2); ---> 4 ........... a:=b|x=2 ----------- 4

[Han]: When assigning variables a value, any expression that needs to be evaluated first will be done prior to storing. So when you type: a:=(b|x=2),
you are storing the result of b|x=2 into the variable a. Of course, if b:=x^2, then b|x=2 will return 4, which is then stored into a. Basically the right hand side of ":=" is evaluated first prior to storing into a.

[me]: I agree it should return 4, but the history represented it as x^2.

Case (I.):
Your Edit: Typing in: a:=b|x=2 will result in (a:=b)|x=2. I would have expected the calculator to think a:=(b|x=2) and not (a:=b)|x=2 Yes! Me, too!

For: a:=b|x=2, I expected b to be eval'ed with the | value. The resulting history representation implies, (to me), that a was replaced by b, due to the way it shows parens, but then ignored the | condition. If that behavior was wanted, why bother including the | suffix?

Case (II.):
To me, this is simply a more clearly represented intention of the desired order of eval, but has exactly the same result. So, I believe, the history representation is correct in it's behavior, revealing UNNECESSARY parens, but it REQUIRED the parens, in the entry line, in order to achieve the result. That would be the bug there.

Again, worthy of bugzilla food? I'm not really sure, but I tend to use the | operator a lot. It's consistent with my handwritten manner, but might not be as important to others. Also, I know de-buggers at hp are busy with more significant things. Having mentioned it, I've done my part and will leave it at that.

Thanks, Han, for collaboratively, elaborating!
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Somewhere between a bug or feature: - DrD - 11-13-2014, 05:52 PM
RE: Somewhere between a bug or feature: - DrD - 11-14-2014 12:35 PM



User(s) browsing this thread: 1 Guest(s)