Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^4: $a++ allowed by $a-- is not ! why?

by kabel (Chaplain)
on Sep 01, 2003 at 10:12 UTC ( #288111=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Re: $a++ allowed by $a-- is not ! why?
in thread $a++ allowed by $a-- is not ! why?

As long as you can mix numbers with letters the problem remains.
no, the signature does not allow to mix letters with numbers. if we allowed this, that means:
++: /\A[a-z0-9]*\z/ -> /\A[a-z0-9]*\z/
, what is the difference between this addition and the addition in a 36-ary number system? (have fun with this link)
the only problem here is that the first character must not be a number, thus the awkward domains:
kabel@linux:~> perl my $num = "1hiho"; print ++ $num, $/; 2 kabel@linux:~>
What about "-1"?
"-1" is an illegal input. harhar. ;-)


Comment on Re^4: $a++ allowed by $a-- is not ! why?
Select or Download Code
Re: Re^4: $a++ allowed by $a-- is not ! why?
by demerphq (Chancellor) on Sep 01, 2003 at 11:02 UTC

    the signature does not allow to mix letters with numbers.

    I think we are at cross purposes here. It does allow them to be mixed, you may have any set of letters followed by any set of numbers and ++ will "work". This means that you still have the problem we have been discussing as there is no mapping from 9 to 'a0' but there is a mapping from 'a0' to 9.


    ---
    demerphq

    <Elian> And I do take a kind of perverse pleasure in having an OO assembly language...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://288111]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2014-12-26 00:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (163 votes), past polls