math.BinToInt

From GMod Wiki

Jump to: navigation, search
Function
Syntax math.BinToInt( String bin )
Where is this used?
Description:
Return the integer value the binary string represents.
Returns: Integer
Part of Library: Math
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Math.BinToInt]Math.BinToInt [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

DescriptionReturns the binary value of 10101s integer value, 21.
Used onNewerShared.png
Code
print(math.BinToInt("10101"))
Output21


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox