> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
> Subject: Re: [OT] of the different methods to get a user-id
>
> For instance.
> i = i++
>
> yields different results depending on what language
> you are using. C and Java produce different outputs
> (which really surprised me!).

Java explicitly defines the behavior of the above statement, whereas the C 
standard does not, and leaves it up to the implementation to decide what to do. 
 However, on almost every platform I have access to right at this moment 
(Windows, Linux, proprietary), printing the value of i after your test 
statement in both C and Java displayed the original value of i (as expected), 
not the increment thereof.  The one problematic environment that gave the 
unexpected answer was Visual C++ 6.0 on Windows (gee, Microsoft ignores 
standard practice? who would a-thunk it); gcc on Windows worked properly.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to