[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Lua
. . -> [Subject]  "bit" library - where to find it
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

"bit" library - where to find it

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Mudassir Tufail   (2 posts)  [Biography] bio
Date Mon 31 Oct 2016 04:41 PM (UTC)
Message
Hello

I see bit manipulation functions defined (http://www.mushclient.com/scripts/doc.php?general=lua_bit) however where do I go get the required "bit" libraries?

I have found a i2c LCD driver (lcdprint.lua) which uses functions such as bit.clear / bit.lshift. I am trying to using it esp8266 nodemcu with LUA SDK but it is failing on finding "bit".

Thanks
[Go to top] top

Posted by Mudassir Tufail   (2 posts)  [Biography] bio
Date Reply #1 on Mon 31 Oct 2016 05:59 PM (UTC)
Message
Never mind - I was able build the Lua SDK (including "bit" library) using https://nodemcu-build.com/index.php.

It works like a charm now :-)
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Tue 01 Nov 2016 04:44 AM (UTC)
Message
Also, it would be similar to the source in MUSHclient:

https://github.com/nickgammon/mushclient/blob/master/scripting/bits.c

I added a few functions to it, such as bit_tonumber, bit_tostring, bit_test and bit_clear.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


1,803 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]