Getting a real number from scientific notation

Paul Dupuis paul at researchware.com
Sun Nov 22 15:44:29 EST 2020


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?


On 11/22/2020 3:30 PM, Klaus major-k via use-livecode wrote:
> Please, this is quite urgent, my customer is waiting impatiently,
> so if someone has an idea...
>
>> Am 22.11.2020 um 21:25 schrieb Klaus major-k via use-livecode <use-livecode at lists.runrev.com>:
>>
>> Hi friends,
>>
>> see subject.
>>
>> I have some values in a CSV with this notation
>> According to the dictionary I tried:
>> on mouseUp pMouseButton
>>    put "4.21911E+11" into tSN
>>    set itemdel to "+"
>>    put char 1 to -2 of item 2 of tSN into t1
>>    put item 2 of tSN into t2
>>    put t1*10^t2 into tRes
>>    #x*10^y.
>> end mouseUp
>>
>> But tRes is also in scientific notation ->  1e+11
>> When I set a breakpoint and doubleclick that value
>> the little popup palette shows a real number however!?
>>
>> What am I missing and is this the correct way to do what I need?
>>
>> Thanks a lot in advance!
> 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





More information about the use-livecode mailing list