[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [PATCH] allow binary coded literals
- From: Joseph Stewart <joseph.stewart@...>
- Date: Thu, 5 Feb 2009 17:01:50 -0500
Really non-standard, but should I mention the erlang format (maybe ada, too) for N-base constants again?
2#1001 = binary
8#777 = octal
16#deadbeef = hexadecimal
36#hello = base 36
I have a stale 5.0 patch I can update if anyone cares.
On Thu, Feb 5, 2009 at 4:54 PM, RJP Computing <firstname.lastname@example.org>
It appears the patch doesn't pass the "0b" prefix to strtol(), it
strips it, and requests base conversion using the last argument to
I like it, its nice for bit fields, and it would be nice to have a %b
string.format specifier, too.
I would love to see this in Lua 5.2.