|
Someone disliked your message enough to down-vote it. The topic is interesting enough IMO, albeit a little OT but that's OK.
|
|
|
|
|
Luc Pattyn wrote: I have learned to stay well away from the borders. Defensive programming is what I call it.
Couldn't agree more, and liberal use of parentheses
|
|
|
|
|
I didn't find much, but I did find "The expressions of an argument list are always evaluated in the order they are written. " on page 182/553 of the C# 2 spec (4th edition / June 2006)
I'm not sure whether that still applies to C# 4 - I'll download the new spec (I don't really know why I still had that old one)
And in 14.2 (page 172) of the same document I found "The order in which operands in an expression are evaluated, is left to right. [Example: In F(i) + G(i++) * H(i), method F is called using the old value of i, then method G is called with the old value of i, and, finally, method H is called with the new value of i. This is separate from and unrelated to operator precedence. end example] "
edit: IMO that [the first quote] supports my claim that MS had inserted sequence points in method argument evaluation, they're just not calling it that..
|
|
|
|
|
Thanks Harold for "The expressions of an argument list are always evaluated in the order they are written"; that is what I knew had to be there, and I now found it in C# 3.0 too.
I'm afraid there is some semantic ambiguity involved; to evaluate can either be "determine the value" or "process the expression yielding a value and execute all side-effects", and I'm pretty sure the latter is what was meant for argument lists.
harold aptroot wrote: And in 14.2 (page 172)
the numbers clearly have changed since. I now found that sentence too, it is under 7.2; and it supports the broader meaning of "to evaluate".
|
|
|
|
|
The second meaning is also what's used by the compiler, so it's probably that
But I can't really find any good "C# 4 language specification" documents, do you know one? Google didn't seem in the mood to give me useful results..
I found some drafts, but well, they're drafts.. or does that mean that the C# 4 specs aren't "official" yet?
modified on Monday, April 26, 2010 5:31 PM
|
|
|
|
|
This[^] is what Google is willing to offer; I see two candidates, nothing final though.
|
|
|
|
|
|
Thanks Michel. I have been expecting Bing to become better at finding MS stuff. They wouldn't dare putting in some meta tags to fool other search engines, would they?
Michel Godfroid wrote: Google is NOT your friend
Yes he is, he is my best mate; he knows almost everything I don't know (and that is a lot). Can't do without him.
|
|
|
|
|
harold aptroot wrote: the C# 4 specs aren't "official" yet?
yes, I expect that is part of the game: propose a standard, get it accepted, then propose extensions and implement them faster than anyone else can, giving you de facto control.
|
|
|
|
|
The sentence "The expressions of an argument list are always evaluated in the order they are written" is still present in the 4.0 document Michel provided a link for. And it now has an example with named parameters. Great.
|
|
|
|
|
Thanks everyone. I googled ?:, but didn't see anything and am not experienced enough to have looked at msdn's operators. Will know for next time.
|
|
|
|
|
Hi,
I want to overlay controls on my main window that fade away and dissapear when the mouse is outside the window. Very much like in Windows Media Player.
Is there a control to do that for me, or can anyone give me some starting information on how that might be achieved.
thanks
jon
|
|
|
|
|
I guess it depends on what version of Media Player you are using but I thought the current version uses WPF which has more graphics capabilities then standard WinForms. Using WinForms though you could try handling the mouse move event or the Deactivated event
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I don't know about any control buy but,
You can put your controls inside a panel, and then handle your main form's active / deactivate , enter / leave events and set the opacity of the panel from 0 to 100 and 100 to 0, using a timer control to fade out and fade in...
(I think Mark has suggested you the same thing...)
modified on Monday, April 26, 2010 1:27 PM
|
|
|
|
|
Look at this for guidance:
.NET Animation Control[^]
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
modified on Monday, April 26, 2010 5:45 PM
|
|
|
|
|
I want to know the meaning of the code
Obj_aCrc = Obj_aCrc + Val(CStr(Asc(Mid(strVal, Obj_i + 1, 1)) * (Obj_i Mod (5) + 1)))
Thanks
|
|
|
|
|
Try the Visual Basic forum, this one is for C#.
It's time for a new signature.
|
|
|
|
|
|
Looks like part of the calculation of a base-5 check digit or cyclic redundancy check.
Wrong forum, though, mate !
and try posting the whole sub if you want to get more than guesses out of the eggheads here. It's bad enough having to answer obscure questions, but guessing at the code is more for the "wicked code" forum
|
|
|
|
|
c la premier fois que je poste une question ici et je ne savais pas que pour chaque langage il y a un forum
so i am poste my question in two times
sorry
|
|
|
|
|
English please
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
So now he's getting flamed for the message language
His french text says: It's the first time I post a question here, and I didn't know there were separate forums for each language..
I'll upvote him to compensate for the grief...
translation:
Donc maintenantt il reçoit un 'flame' pour la langue du message
(+Traduction Française)
Je voterais pour lui afin de compenser...
Now can we stop this ?
For those who don't follow: he cross-posted in Vb Forum[^], where I told him that he should not cross post without deleting the original, and where Eddy Vluggen told him that he should not delete a question to which there was already an answer.
It's one of these days
|
|
|
|
|
Michel Godfroid wrote: and I didn't know there were separate forums for each language..
Which is why there is a FAQ at the top of each forum explaining how, why and where to post questions. It is also accepted that all communication uses English as this is an international site and English is the language most commonly used by the majority.
It's time for a new signature.
|
|
|
|
|
Michel Godfroid wrote: It's one of these days
Should we have encouraged the correct use of the PRE tags?
I are Troll
|
|
|
|
|
nothing to say
thank you for all
|
|
|
|