> From: "cloud" <[EMAIL PROTECTED]>
> To: "Paul G. Weiss" <[EMAIL PROTECTED]>
> Cc: "'[EMAIL PROTECTED]'" 
> <[EMAIL PROTECTED]>
> Subject: Re: Strange Question? Is compiler fault?
> Date: Fri, 15 Jun 2001 11:59:36 +0800
> 
> 
> although $i = $i run before $i++, But
> the increment should be work, so $i should be 1, isn't it?
> 
> ----- Original Message -----
> From: "Paul G. Weiss" <[EMAIL PROTECTED]>
> To: "cloud" <[EMAIL PROTECTED]>
> Cc: "'[EMAIL PROTECTED]'"
> <[EMAIL PROTECTED]>
> Sent: Friday, June 15, 2001 11:42 AM
> Subject: Re: Strange Question? Is compiler fault?
> 
> 
> > The expression $i++ has the *effect* of incrementing $i
> > but its *value* is the value of $i before the increment.
> >
> > So the assignment
> >
> > $i = $i++;
> >
> > is a no-op, because you are assigning to $i the value that
> > it had before the increment.
> >
> > -Paul
> >
> >
> >
> >
> > On Fri, 15 Jun 2001, cloud wrote:
> >
> > > All:
> > >
> > > I excute follow code & got some Strange result,
> > > Why? Why $i = 0
> > > ===========================
> > > $i = 0;
> > > $i = $i++;
> > > print "$i\n";
> > > ===========================
> > >
> > >
> > > _______________________________________________
> > > Perl-Win32-Users mailing list
> > > [EMAIL PROTECTED]
> > > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
> > >

I thought for sure that about 9 months ago I heard some discusion on
this list about the autoincrement  operator not having any difinative
order.  Basically, from what I remember, the thread ended up saying not
to rely on the value being either changed or unchanged if you use the
var on the same line for some other reason.  Does anyone else rememever
that?






_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Reply via email to