Posts | ||
---|---|---|
LUA question.... | Locked | |
Thread Options | ||
Nov 25 2014 Anchor | ||
I've decided to try and learn some programming with LUA and I'm stuck on an exercise. Can someone tell me how I can find 2 to the 16th power without any mathematical operators or typing in the answer in decimal form? I appreciate any help.
|
||
|
Nov 25 2014 Anchor | |
You should type it in this format: So 2 to the power of 16 should be 0xffff ? Edited by: Nightshade -- - My portfolio |
||
Dec 2 2014 Anchor | ||
Just out of interest: why would you want to use base 16 literal hex codes? 2^16 is the equivalent of 2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2 Here is a little code example I wrote for a wiki:
P.S: It's Lua not LUA, but no worries! Edited by: AFRLme |
||
Feb 19 2015 Anchor | ||
It also hints that I should google "base16 literals", but I'm still lost. ______________________ |
Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.