[Toybox] Integer value parsing issue

David Seikel onefang at gmail.com
Fri Apr 5 07:26:53 PDT 2013


On Fri, 5 Apr 2013 23:16:13 +0900 Kyungwan Han <asura321 at gmail.com>
wrote:

> Hi,
> 
> I'm making arping, but I find some issue about parsing integer value
> when I test toybox arping.
> 
> Toybox infra code handles the number values in three way:
> 
> 1. if you input 10, it is treated as decimal number. it is 10
> 2. if you input 010, it is treated as octal number. it is 8
> 3. if you input 0x10, it is treated as Hex number. it is 16
> 
> 
> So when I execute *$ toybox arping -c 010 100.0.0.1, *arping* *is
> executed 8 times.
> In my ubuntu, however, when I execute *$ arping -c 010 100.0.0.1*,
> arping is executed 10 times.
> *
> *
> *
> *
> I think toybox's approach is right, because it can supports octal, hex
> number automatically.
> It's very useful.
> But above case, some people can be confused.
> Is it fine?
> How about your opinion?
> 
> Thanks.
> Kyungwan Han.

Is octal actually useful for anything any more?  In the above case, all
it does is make you type two extra digits, specifying a count in octal
seems like a silly idea to me.

You asked for opinions, there's mine.  B-)

-- 
A big old stinking pile of genius that no one wants
coz there are too many silver coated monkeys in the world.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20130406/7132971c/attachment-0002.pgp>


More information about the Toybox mailing list