On Fri, Dec 06, 2002 at 02:46:13PM -0800, david wrote:

> btw, the ++$i / ++$i gives you a 1 thing behaves differently in other 
> programming languages. For example, try the following in C++:
> 
> #include<iostream.h>
> void main{
>         int i=2;
>         int j=++i/++i;
>         cout<<j<<endl;
> }
> 
> won't give you a 1.

But it might.  The behaviour is undefined.  The compiler may do as it
will.  Google for "sequence point" if you want to find out more.

The behaviour in Perl is undefined too, but more in the sense that the
behaviour has not been defined rather than that the behaviour has been
defined as undsefined.

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to