lua-users home
lua-l archive

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

Part of gluax, here's a wrapper:

Attachment: bitlib_wrap.lua
Description: Binary data

You can extract the "hex()" and "bin()" functions.


local var= hex'ff00aa8'

I've found the string notation (no function paranthesis) to be extremely pleasant in this situation.

Edelleenlähetetyn viestin alku:

Lähettäjä: "Brett Bibby" <>
Päiväys: perjantai, 31. lokakuuta 2003  08:03:11 +0200
Vastaanottaja: "Lua List" <>
Aihe: number bases
Vastaus: Lua list <>

Is there any way to specify numeric constants in any base other than 10?
Specifically I want to specify numbers in hexidecimal format such as
0x00a012b3.  Is there any way to do this?