[Implemented] Number base sensitive Val() functions
Posted: Sun Apr 08, 2007 1:48 pm
Since PureBasic has Bin() and Hex() funcitons,
A natural addition would be Val() functions that were number base sensitive using the first character of the string.
If the first character is a "%", treat it as binary
ElseIF the first character is a "$", treat it as hexadecimal
Else treat it as decimal
(I know you can write a function to do this but since the Bin and Hex commands exist, I just think it would be natural for Val to handle them as well)
A natural addition would be Val() functions that were number base sensitive using the first character of the string.
If the first character is a "%", treat it as binary
ElseIF the first character is a "$", treat it as hexadecimal
Else treat it as decimal
(I know you can write a function to do this but since the Bin and Hex commands exist, I just think it would be natural for Val to handle them as well)