Re: Doing Maths in Hex

2016-05-04 Thread Peter TB Brett
On 04/05/2016 15:01, dunb...@aol.com wrote: There are not even enough letters in the alphabet to reach "10" (base 42). I suppose you could use a subset of the base64 alphabet (treat uppercase and lowercase letters as different values). Peter -- Dr Peter

Re: Doing Maths in Hex

2016-05-04 Thread Paul Dupuis
On 5/4/2016 10:01 AM, dunb...@aol.com wrote: > There are not even enough letters in the alphabet to reach "10" (base 42). You are not considering Unicode in LC7 and 8 :-) ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this

Re: Doing Maths in Hex

2016-05-04 Thread dunbarx
There are not even enough letters in the alphabet to reach "10" (base 42). -Original Message- From: Mark Wieder <mwie...@ahsoftware.net> To: How to use LiveCode <use-livecode@lists.runrev.com> Sent: Tue, May 3, 2016 9:56 pm Subject: Re: Doing Maths in Hex On 05/

Re: Doing Maths in Hex

2016-05-03 Thread Mark Wieder
On 05/03/2016 11:53 AM, [-hh] wrote: Bonjour Thierry, Perfect. But now, of course, the question arises, how to do that in base 42 ;-) return (6 * 8) -- Mark Wieder ahsoftw...@gmail.com ___ use-livecode mailing list use-livecode@lists.runrev.com

Re: Doing Maths in Hex

2016-05-03 Thread Bob Sneidar
Don't do that. You'll break the universe. Bob S On May 3, 2016, at 11:53 , [-hh] > wrote: Bonjour Thierry, Perfect. But now, of course, the question arises, how to do that in base 42 ;-) Hermann ___

Re: Doing Maths in Hex

2016-05-03 Thread [-hh]
addHexy >local T >repeat with i = 1 to paramCount() > add baseConvert( param( i) ,16,10) to T >end repeat >return baseconvert( T, 10, 16) > end addHexy > > ​Thierry > ​ -- View this message in context: http://runtime-revolution.278305.n4.nabble.

Re: Doing Maths in Hex

2016-05-03 Thread Thierry Douez
> > 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,

Re: Doing Maths in Hex

2016-05-03 Thread Devin Asay
> On May 3, 2016, at 11:13 AM, Thierry Douez 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

Re: Doing Maths in Hex

2016-05-03 Thread Thierry Douez
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 2016-05-03 18:13 GMT+02:00 Devin Asay

Re: Doing Maths in Hex

2016-05-03 Thread Devin Asay
> On May 3, 2016, at 9:32 AM, dunbarx wrote: > > Richmond. > > LC cannot add "20F" to "4CD". You need to use "baseConvert". Not onerous at > all, really. put baseConvert(baseConvert("20F",16,10) + baseConvert("4CD",16,10),10,16) devin Devin Asay Office of Digital

Re: Doing Maths in Hex

2016-05-03 Thread dunbarx
Richmond. LC cannot add "20F" to "4CD". You need to use "baseConvert". Not onerous at all, really. Craig -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Doing-Maths-in-Hex-tp4704028p4704160.html Sent from the Revoluti

Re: Doing Maths in Hex

2016-05-03 Thread Bob Sneidar
When I did my IP subnet calculator, there were some things that required binary, like determining what part of the IP address was the network address, and other operations required decimal. Of course, that was a unique problem as each octet is a discreet value, and not part of a *total*

Doing Maths in Hex

2016-05-01 Thread RM
Is it possible for Livecode to do Mathematics in Hexadecimal? Or, am I going to have to shove Hex numbers through a Hex-to-Decimal meat grinder, do the Math(s) and then shove the result through a Decimal-to-Hex meat grinder . . . . . . all going to be a pain-in-the-b quite frankly