Doing Maths in Hex

Devin Asay devin_asay at byu.edu
Tue May 3 13:21:25 EDT 2016


> On May 3, 2016, at 11:13 AM, Thierry Douez <th.douez at gmail.com> wrote:
> 
> and with a bit of factoring...
> 
>   put addHex( "20F", "4CD")
> 
> 
> function addHex v1, v2
>   local d1, d2
>   put baseConvert( v1,16,10)  into d1
>   put baseConvert( v2,16,10)  into d2
>   return baseconvert( d1 + d2, 10, 16)
> end addHex
> 
> Thierry

Well done, Thierry!

Devin


Devin Asay
Office of Digital Humanities
Brigham Young University





More information about the use-livecode mailing list