Ambiguities
Charudutta S. Palkar
csp at gtenmc.UUCP
Wed Sep 12 04:03:25 AEST 1990
>
>In article <861 at gtenmc.UUCP> you write:
>
>> b ) a = a - ( b = ( a = a + b ) - b );
> ^
>??? Is there any way you can guarantee the value of the marker 'a'?
>It could have (a) the value of 'a' immediately before the statement
>is executed, or (b) the value generated by innermost (a = a + b).
>
>> b ) a = a ^ ( b = b ^ ( a = a ^ b ));
>
>Same problem here.
>....
>
>Anders Thulin ath at prosys.se {uunet,mcsun}!sunic!prosys!ath
I am aware of this , but the point I would like to raise :-
Does C mention , which instance of the variable should be used ,
while evaluating the expression. If neither K&R C or ANSI C
specify it. I propose that such a standard be set, for one
it will help removing ambiguities of evaluation ( implementation
dependencies ).
Some may get the impression I am for cryptic code. No I am not
for cryptic code but for use of the language with all its features.
If some programmers cannot use its features they might as well
stop using it.
C S Palkar
csp - csp at gtenmc.gtetele.com
csp at gtenmc.UUCP
" I speak only for myself "
K&R C > ANSI C
More information about the Comp.lang.c
mailing list