HI,
I have confusion in assertion statement.
assert Expression1:Expression2;
aseert statement should not change or alter the value of any variable.
so,
assert i%2==0:i++; //line 1
assert i<100:i=i%100; //line 2
assert x-->0; //line 3
According to me all the three statement give compile time error as they are altering the values.
Am I right?
one more thing:
At compile time the compiler look for the complete assert statement means both Expression1 and Expression 2 and if any statement alter the value(any side effect found) will give compiler error.
Am I right?
Correct me.
Thanks
sandhi