>>>>> "A" == Alan Moore <alan_moore / gmx.net> writes:

A>    string      oct     hex   to_i
A>    ------------------------------
A>    "13"         11      19     13
A>    "0x0d"       13      13      0
A>    "0b1101"     13  725249      0
A>    "015"        13      21     15
A>    "+ 13"       11       0      0

pigeon% perl -le 'print oct("13"),"-",hex("13"),"-",int("13")'
11-19-13
pigeon% perl -le 'print oct("0x0d"),"-",hex("0x0d"),"-",int("0x0d")'
13-13-13
pigeon% perl -le 'print oct("0b1101"),"-",hex("0b1101"),"-",int("0b1101")'
13-725249-0
pigeon% perl -le 'print oct("015"),"-",hex("015"),"-",int("015")'
13-21-15
pigeon% 


A>     string      oct     hex   to_i
A>     ------------------------------
A>     "-13"       -11     -19    -13
A>     "-0x0d"       0     -13      0
A>     "-0b1101"     0 -725249      0
A>     "-015"      -13     -21    -15
A>     "- 13"      -11       0      0

pigeon% perl -le 'print oct("-13"),"-",hex("-13"),"-",int("-13")'
0-0--13
pigeon% perl -le 'print oct("-0x0d"),"-",hex("-0x0d"),"-",int("-0x0d")'
0-0--13
pigeon% perl -le 'print oct("-0b1101"),"-",hex("-0b1101"),"-",int("-0b1101")'
0-0-0
pigeon% perl -le 'print oct("-015"),"-",hex("-015"),"-",int("-015")'
0-0--15
pigeon% 

 ruby is smarter than perl :-)

 Don't change it :-)


Guy Decoux