in reply to Re: Getting different results with $var++ and $var += 1
in thread Getting different results with $var++ and $var += 1
Every time I've ever used a scalar in numeric context in the past it has worked. The +=0 stuff may be unnecessary, but I'm desperate enough to try unnecessary things. I've never had to struggle for hours in order to add two numbers.
Since I posted last night, I got a response to a private request for help that indicates that $var++ just increments without assignment. So is it possible for the ++ operator to increment a value that cannot be seen in numeric context? It's a stretch of my imagination, but I'm open to the idea that it's only a stretch of my imagination because my understanding is stunted.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Getting different results with $var++ and $var += 1
by ikegami (Patriarch) on Dec 03, 2008 at 21:46 UTC | |
|
Re^3: Getting different results with $var++ and $var += 1
by GrandFather (Saint) on Dec 03, 2008 at 21:25 UTC | |
by splicer (Novice) on Dec 03, 2008 at 22:05 UTC | |
by syphilis (Archbishop) on Dec 03, 2008 at 23:29 UTC | |
by splicer (Novice) on Dec 04, 2008 at 00:23 UTC | |
by syphilis (Archbishop) on Dec 04, 2008 at 01:30 UTC |