On Jun 30, 2005, at 11:17 AM, Mars Saxman wrote:
On Jun 30, 2005, at 9:56 AM, Norman Palardy wrote:
is it primarily because date has a conversion to string and so both
signatures match ?
I can see how that would be ambiguous
the odd thing is that it does work if you do
"the beginning" + New Date.SQLDate() + "and the end"
so I dont understand why additional parens would make it ambiguous
It has nothing to do with conversions. All it takes is this:
foo(bar).baz
Does that mean "call foo, passing in bar, and call baz on the result",
or does it mean "evaluate bar, call baz on its result, and call foo on
its result?"
Hmmm ....
evaluate bar, call foo on the result, call baz on the result of that
parens, then left to right
Just using what I would expect would be the precedence rules for such
operators based on what other languages that allow such constructs
would do.
If it were ambiguous this would be ambisuous in a similar way wouldn't
it ? But this works just fine.
"the beginning" + New Date.SQLDate() + "and the end"
Stefans example would not work with a few extraneous parens though
"the beginning" + (New Date()).SQLDate() + "and the end"
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|