lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Fri, Aug 2, 2013 at 4:19 PM, Andrew Starks <andrew.starks@trms.com> wrote:
I assume there is no objection to posting it on github?

I got bored and did this: 

https://gist.github.com/stevedonovan/6146474

This version works for both 5.1 and 5.2, and adds __pow.

int64.new can be passed an integer, or a string representing an integer; this may now be a hex literal in the 0x... form.

int64.tohex(n) gives a hex representation of the 64-bit value. int64.num(n) attempts a conversion. It is not very clever.

steve d.