[Gambas-user] does exit a instruction to convert hexadecimal to decimal?

vuott at tutanota.com vuott at tutanota.com
Thu Sep 28 00:13:58 CEST 2023


the "&" character alone is sufficient:

   num = Val("&" & mystring)




27 set 2023, 22:42 da brian at westwoodsvcs.com:

> You cal also use num = VAL("&H0"&mystring)
>
> On 9/27/23 12:29, roberto.premoli at tiscali.it wrote:
>
>> Hello,
>> I use hex$ to convert decimal to hexadecimal, and it works
>>
>> But I ave also the opposite need, to convert a HEXacecimal value into a DECimal value but it seems does not exist a "DEC$"
>>
>> I can write my own routine that elaborate the string (i.e. "EA") and return the equivalent inter decimal 234, but it will be better to use the gambas instruction, , if it exist.
>>
>>
>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>>
>
> -- 
> ~~~~ Brian
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230928/7a2ead0f/attachment.htm>


More information about the User mailing list