develooper Front page | perl.perl6.language | Postings from August 2005

Ambiguity of parsing numbers with underscores/methods

Thread Next
From:
Ingo Blechschmidt
Date:
August 16, 2005 13:14
Subject:
Ambiguity of parsing numbers with underscores/methods
Message ID:
ddth6q$3uk$1@sea.gmane.org
Hi,

    1_234;      # surely 1234
    1e23;       # surely 1 * 10**23

    1._5;       # call of method "_5" on 1?
    1._foo;     # call of method "_foo" on 1?

    1.e5;       # 1.0 * 10**5?
    1.efoo;     # call of method "efoo" on 1?
    1.e_foo;    # call of method "e_foo" on 1?

    0xFF.dead;  # call of method "dead" on 0xFF?



--Ingo

-- 
Linux, the choice of a GNU | Elliptic paraboloids for sale.  
generation on a dual AMD   | 
Athlon!                    | 


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About