bit64.new

LuaFAR 3

bit64.new


result = bit64.new (arg)

Parameters:
  arg:     string, number or userdata

Returns:
  result:  userdata, or nil

Description:

This function creates a new "64-bit int" type userdata from the input value.

If arg is a string, it must be an acceptable string representation of
a 64-bit integer. The function returns nil if the input string can not
be converted.

The string representation of an integer acceptable by the function must
have either the hexadecimal form
  -?0[xX][0-9A-Fa-f]{1,16}, e.g. "0x56DF5"
or the decimal form
  -?[0-9]+, e.g. "-234567".

If arg is a number, it must fit in 53 bits, otherwise nil is returned.

If arg is a "64-bit int" type userdata then a new userdata with the same
value is created and returned.