Click to See Complete Forum and Search --> : Undefined Behaviour or What ???


Vedam Shashank
September 13th, 2005, 09:25 PM
Is the behaviour of such statements defined ???

int i;

i = ++i;
i = ++i + ++i;
i = ++i + i++;

In C++ you are not to modify the value of a variable more than once between 2 "sequence points".
So i was wondering if this is fine in C#.

Does C# have any standards defined like the C++ standards???

Thanks In Advance

wildfrog
September 14th, 2005, 03:35 AM
Does C# have any standards defined like the C++ standards???Here it is:
http://www.ecma-international.org/publications/standards/Ecma-334.htm

- petter

Vedam Shashank
September 14th, 2005, 03:45 AM
Thanks

I created the thread clicked submit, and then clicked on stop to modify the thread. And thus 2 threads.
I hope some moderator merges the 2 threads.