What's the opposite of Hex$?
BlitzMax Forums/BlitzMax Beginners Area/What's the opposite of Hex$?| 
 | ||
| Is there an opposite to Hex$()? And the docs say that the Hex$() command, among others, is only in for basic compatibility, and that new commands supercede it. So which commands am I supposed to be using instead? | 
| 
 | ||
| 
Rem
bbdoc: HexToInt converts a hex value to integer
about: the value passed must be a string containing a valid Hex value ($ sign is optional)
EndRem
Function HexToInt:Int( HexStr:String )
	If HexStr.Find("$") <> 0 Then HexStr = "$" + HexStr$
	Return Int(HexStr)
End Function
 | 
| 
 | ||
| Thanks, that works great. |