in reply to Re^4: How the auto-increment operator works?
in thread How the auto-increment operator works?
Nobody really cares as long as there is no repetition. :)
Anyway think of this old counting machines with numbers on wheels, if one of the wheels changed from 9 to 0 it also incremented the one the the left, and so on. So 19++ becomes 20.
That's totally the same thing, only difference is that we have three different kind of wheels.
They are either
> if I do my $foo = "Bz"; print ++$foo; it prints "Ca".
"z" is at the upper limit like 9, when changing to the start "a" it has to increment the next position, but within it's symbol group. "C" follows "B" like 2 followed 1 when incrementing 19.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: How the auto-increment operator works?
by zapdos (Sexton) on Aug 02, 2020 at 00:43 UTC | |
by AnomalousMonk (Archbishop) on Aug 02, 2020 at 01:00 UTC | |
by zapdos (Sexton) on Aug 02, 2020 at 01:20 UTC | |
by LanX (Saint) on Aug 02, 2020 at 02:13 UTC | |
by AnomalousMonk (Archbishop) on Aug 02, 2020 at 02:45 UTC | |
by zapdos (Sexton) on Aug 02, 2020 at 03:17 UTC | |
|