[ create a new paste ] login | about

Link: http://codepad.org/OtqWhpRg    [ raw code | output | fork ]

Lua, pasted on Feb 17:
1
2
3
4
5
6
7
8
9
10
11
12
str = "D5"

if(str ~= nil)then
print(tonumber(str,16));
end

if(tonumber(str,16) >= 0x0 and tonumber(str,16) <= 0xFF and str ~= nil)then
print("Right area");

else
print("Wrong area");
end


Output:
1
2
213
Right area


Create a new paste based on this one


Comments: