Getting a real number from scientific notation

Roger Guay irog at mac.com
Mon Nov 23 16:50:44 EST 2020


Oops, doesn’t work here. I have this script:
	on MouseUp

		set the numberformat to  “0"

		put 4.21911e+11

	End mouseUp

puts 4.21911e+11 into msg box

What am I missing?

Roger


> On Nov 23, 2020, at 6:57 AM, Craig newman via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Klaus.
> 
> Old fashioned way:
> 
> Set the numberFormat to "0"
> Answer "4.21911E+11" + 0
> 
> Craig
> 
> -----Original Message-----
> From: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] On Behalf
> Of Klaus major-k via use-livecode
> Sent: Sunday, November 22, 2020 3:48 PM
> To: How to use LiveCode <use-livecode at lists.runrev.com>
> Cc: Klaus major-k <klaus at major-k.de>
> Subject: Re: Getting a real number from scientific notation
> 
> Hi Paul,
> 
>> Am 22.11.2020 um 21:44 schrieb Paul Dupuis via use-livecode
> <use-livecode at lists.runrev.com>:
>> 
>> So, if you want to concert form scientific notation to a real number, you
> can use the "format" function (see dictionary). Example:
>> putformat("%1.0f",4.21911E+11) -- outputs 421911000000 Is that shat yo 
>> are looking for?
> 
> YES, thanks a BUNCH, that is exactly what I need!
> 
> 
> Best
> 
> Klaus
> --
> Klaus Major
> https://www.major-k.de
> klaus at major-k.de
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list