Re: Getting a real number from scientific notation

2020-11-23 Thread Bob Sneidar via use-livecode
It’s more than that. There is so much to RegEx, and the different iterations of 
it, that no dictionary could really cover it. If you want to familiarize 
yourself with Regex, you really need to visit a tutorial site. Heck, even when 
you google how to do something, you will likely get a discussion going as to 
why the first solution posted won’t work right for situation x or y, then 
someone will contradict that person and before you know it 5 or 6 of the people 
who actually KNOW Regex will jump into the fray. You may or may not get a 
really good answer. 

Bob S


> On Nov 23, 2020, at 4:43 PM, Roger Guay via use-livecode 
>  wrote:
> 
> Unfortunately, there are not enough examples in the dictionary for an amateur 
> like myself to understand it!
> 
> Roger
> 
>> On Nov 23, 2020, at 4:09 PM, Paul Dupuis via use-livecode 
>>  wrote:
>> 
>> All this is why I prefer format() over numberFormat. The function is more 
>> versatile and you get exactly what you specify with less guess work.
>> 
>> On 11/23/2020 6:52 PM, Roger Guay via use-livecode wrote:
>>> Yaknow, this whole thing is confusing. Turns out you don’t even need to set 
>>> the numberFormat.
>>> put 4.21911e+11 + 0 results in 42191000.
>>> 
>>> Roger
>>> 
>>>> On Nov 23, 2020, at 2:44 PM, Craig newman via use-livecode 
>>>>  wrote:
>>>> 
>>>> Nope.
>>>> 
>>>> The "numberFormat" property is perfectly happy with quotes around its 
>>>> formatExpression. It is also perfectly happy without it. But I always use 
>>>> quotes for things like this.
>>>> 
>>>> Craig
>>>> 
>>>> -Original Message-----
>>>> From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On 
>>>> Behalf Of Roger Guay via use-livecode
>>>> Sent: Monday, November 23, 2020 5:25 PM
>>>> To: How to use LiveCode 
>>>> Cc: Roger Guay 
>>>> Subject: Re: Getting a real number from scientific notation
>>>> 
>>>> That works. Thanks, Klaus!
>>>> 
>>>> Roger
>>>> 
>>>> 
>>>> 
>>>>> On Nov 23, 2020, at 1:55 PM, Klaus major-k via use-livecode 
>>>>>  wrote:
>>>>> 
>>>>> Hi Roger,
>>>>> 
>>>>> you forgot + 0 :-)
>>>>> 
>>>>> on MouseUp
>>>>> set the numberformat to 0 # NO quotes around this 0 or LC gives an
>>>>> error  put 4.21911e+11 + 0 End mouseUp
>>>>> 
>>>>> -> 42191100
>>>>> 
>>>>>> Am 23.11.2020 um 22:50 schrieb Roger Guay via use-livecode 
>>>>>> :
>>>>>>  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
>>>>> Best
>>>>> 
>>>>> Klaus
>>>>> 
>>>>> --
>>>>> Klaus Major
>>>>> https://www.major-k.de
>>>>> kl...@major-k.de
>>>>> 
>>>>> 
>>>>> ___
>>>>> use-livecode mailing list
>>>>> use-livecode@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@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@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@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@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Getting a real number from scientific notation

2020-11-23 Thread Roger Guay via use-livecode
Unfortunately, there are not enough examples in the dictionary for an amateur 
like myself to understand it!

Roger

> On Nov 23, 2020, at 4:09 PM, Paul Dupuis via use-livecode 
>  wrote:
> 
> All this is why I prefer format() over numberFormat. The function is more 
> versatile and you get exactly what you specify with less guess work.
> 
> On 11/23/2020 6:52 PM, Roger Guay via use-livecode wrote:
>> Yaknow, this whole thing is confusing. Turns out you don’t even need to set 
>> the numberFormat.
>> put 4.21911e+11 + 0 results in 42191000.
>> 
>> Roger
>> 
>>> On Nov 23, 2020, at 2:44 PM, Craig newman via use-livecode 
>>>  wrote:
>>> 
>>> Nope.
>>> 
>>> The "numberFormat" property is perfectly happy with quotes around its 
>>> formatExpression. It is also perfectly happy without it. But I always use 
>>> quotes for things like this.
>>> 
>>> Craig
>>> 
>>> -Original Message-
>>> From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf 
>>> Of Roger Guay via use-livecode
>>> Sent: Monday, November 23, 2020 5:25 PM
>>> To: How to use LiveCode 
>>> Cc: Roger Guay 
>>> Subject: Re: Getting a real number from scientific notation
>>> 
>>> That works. Thanks, Klaus!
>>> 
>>> Roger
>>> 
>>> 
>>> 
>>>> On Nov 23, 2020, at 1:55 PM, Klaus major-k via use-livecode 
>>>>  wrote:
>>>> 
>>>> Hi Roger,
>>>> 
>>>> you forgot + 0 :-)
>>>> 
>>>> on MouseUp
>>>> set the numberformat to 0 # NO quotes around this 0 or LC gives an
>>>> error  put 4.21911e+11 + 0 End mouseUp
>>>> 
>>>> -> 42191100
>>>> 
>>>>> Am 23.11.2020 um 22:50 schrieb Roger Guay via use-livecode 
>>>>> :
>>>>>   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
>>>> Best
>>>> 
>>>> Klaus
>>>> 
>>>> --
>>>> Klaus Major
>>>> https://www.major-k.de
>>>> kl...@major-k.de
>>>> 
>>>> 
>>>> ___
>>>> use-livecode mailing list
>>>> use-livecode@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@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@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@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Getting a real number from scientific notation

2020-11-23 Thread Paul Dupuis via use-livecode
All this is why I prefer format() over numberFormat. The function is 
more versatile and you get exactly what you specify with less guess work.


On 11/23/2020 6:52 PM, Roger Guay via use-livecode wrote:

Yaknow, this whole thing is confusing. Turns out you don’t even need to set the 
numberFormat.
put 4.21911e+11 + 0 results in 42191000.

Roger


On Nov 23, 2020, at 2:44 PM, Craig newman via use-livecode 
 wrote:

Nope.

The "numberFormat" property is perfectly happy with quotes around its 
formatExpression. It is also perfectly happy without it. But I always use quotes for 
things like this.

Craig

-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of 
Roger Guay via use-livecode
Sent: Monday, November 23, 2020 5:25 PM
To: How to use LiveCode 
Cc: Roger Guay 
Subject: Re: Getting a real number from scientific notation

That works. Thanks, Klaus!

Roger




On Nov 23, 2020, at 1:55 PM, Klaus major-k via use-livecode 
 wrote:

Hi Roger,

you forgot + 0 :-)

on MouseUp
set the numberformat to 0 # NO quotes around this 0 or LC gives an
error  put 4.21911e+11 + 0 End mouseUp

-> 42191100


Am 23.11.2020 um 22:50 schrieb Roger Guay via use-livecode 
:
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

Best

Klaus

--
Klaus Major
https://www.major-k.de
kl...@major-k.de


___
use-livecode mailing list
use-livecode@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@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@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Getting a real number from scientific notation

2020-11-23 Thread Roger Guay via use-livecode
Yaknow, this whole thing is confusing. Turns out you don’t even need to set the 
numberFormat.
put 4.21911e+11 + 0 results in 42191000.

Roger

> On Nov 23, 2020, at 2:44 PM, Craig newman via use-livecode 
>  wrote:
> 
> Nope.
> 
> The "numberFormat" property is perfectly happy with quotes around its 
> formatExpression. It is also perfectly happy without it. But I always use 
> quotes for things like this.
> 
> Craig
> 
> -Original Message-
> From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf 
> Of Roger Guay via use-livecode
> Sent: Monday, November 23, 2020 5:25 PM
> To: How to use LiveCode 
> Cc: Roger Guay 
> Subject: Re: Getting a real number from scientific notation
> 
> That works. Thanks, Klaus!
> 
> Roger
> 
> 
> 
>> On Nov 23, 2020, at 1:55 PM, Klaus major-k via use-livecode 
>>  wrote:
>> 
>> Hi Roger,
>> 
>> you forgot + 0 :-)
>> 
>> on MouseUp
>> set the numberformat to 0 # NO quotes around this 0 or LC gives an 
>> error  put 4.21911e+11 + 0 End mouseUp
>> 
>> -> 42191100
>> 
>>> Am 23.11.2020 um 22:50 schrieb Roger Guay via use-livecode 
>>> :
>>> 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
>> 
>> Best
>> 
>> Klaus
>> 
>> --
>> Klaus Major
>> https://www.major-k.de
>> kl...@major-k.de
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@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@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


RE: Getting a real number from scientific notation

2020-11-23 Thread Craig newman via use-livecode
Nope.

The "numberFormat" property is perfectly happy with quotes around its 
formatExpression. It is also perfectly happy without it. But I always use 
quotes for things like this.

Craig

-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of 
Roger Guay via use-livecode
Sent: Monday, November 23, 2020 5:25 PM
To: How to use LiveCode 
Cc: Roger Guay 
Subject: Re: Getting a real number from scientific notation

That works. Thanks, Klaus!

Roger



> On Nov 23, 2020, at 1:55 PM, Klaus major-k via use-livecode 
>  wrote:
> 
> Hi Roger,
> 
> you forgot + 0 :-)
> 
> on MouseUp
>  set the numberformat to 0 # NO quotes around this 0 or LC gives an 
> error  put 4.21911e+11 + 0 End mouseUp
> 
> -> 42191100
> 
>> Am 23.11.2020 um 22:50 schrieb Roger Guay via use-livecode 
>> :
>>  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
> 
> Best
> 
> Klaus
> 
> --
> Klaus Major
> https://www.major-k.de
> kl...@major-k.de
> 
> 
> ___
> use-livecode mailing list
> use-livecode@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Getting a real number from scientific notation

2020-11-23 Thread Roger Guay via use-livecode
That works. Thanks, Klaus!

Roger



> On Nov 23, 2020, at 1:55 PM, Klaus major-k via use-livecode 
>  wrote:
> 
> Hi Roger,
> 
> you forgot + 0 :-)
> 
> on MouseUp
>  set the numberformat to 0 # NO quotes around this 0 or LC gives an error
>  put 4.21911e+11 + 0
> End mouseUp
> 
> -> 42191100
> 
>> Am 23.11.2020 um 22:50 schrieb Roger Guay via use-livecode 
>> :
>>  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
> 
> Best
> 
> Klaus
> 
> --
> Klaus Major
> https://www.major-k.de
> kl...@major-k.de
> 
> 
> ___
> use-livecode mailing list
> use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Getting a real number from scientific notation

2020-11-23 Thread Klaus major-k via use-livecode



> Am 23.11.2020 um 23:09 schrieb Klaus major-k via use-livecode 
> :
> 
> Correction!
> 
>> Am 23.11.2020 um 22:55 schrieb Klaus major-k via use-livecode 
>> :
>> ...
>> on MouseUp
>> set the numberformat to 0
>> # NO quotes around this 0 or LC gives an error
> 
> Quotes are in fact allowed for the numberformat, but I copied the 
> script from my mail client and those were obviously Curky Quotes.

Curly not Curky of course 8-)

--
Klaus Major
https://www.major-k.de
kl...@major-k.de


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Getting a real number from scientific notation

2020-11-23 Thread Klaus major-k via use-livecode
Correction!

> Am 23.11.2020 um 22:55 schrieb Klaus major-k via use-livecode 
> :
> ...
> on MouseUp
>  set the numberformat to 0
> # NO quotes around this 0 or LC gives an error

Quotes are in fact allowed for the numberformat, but I copied the 
script from my mail client and those were obviously Curky Quotes.

>  put 4.21911e+11 + 0
> End mouseUp

--
Klaus Major
https://www.major-k.de
kl...@major-k.de


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Getting a real number from scientific notation

2020-11-23 Thread Klaus major-k via use-livecode
Hi Roger,

you forgot + 0 :-)

on MouseUp
  set the numberformat to 0 # NO quotes around this 0 or LC gives an error
  put 4.21911e+11 + 0
End mouseUp

-> 42191100

> Am 23.11.2020 um 22:50 schrieb Roger Guay via use-livecode 
> :
>   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

Best

Klaus

--
Klaus Major
https://www.major-k.de
kl...@major-k.de


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Getting a real number from scientific notation

2020-11-23 Thread Roger Guay via use-livecode
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 
>  wrote:
> 
> Klaus.
> 
> Old fashioned way:
> 
> Set the numberFormat to "0"
> Answer "4.21911E+11" + 0
> 
> Craig
> 
> -Original Message-
> From: use-livecode [mailto:use-livecode-boun...@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 
> Cc: Klaus major-k 
> Subject: Re: Getting a real number from scientific notation
> 
> Hi Paul,
> 
>> Am 22.11.2020 um 21:44 schrieb Paul Dupuis via use-livecode
> :
>> 
>> 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 42191100 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
> kl...@major-k.de
> 
> 
> ___
> use-livecode mailing list
> use-livecode@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Getting a real number from scientific notation

2020-11-23 Thread Klaus major-k via use-livecode
Hi Craig,

> Am 23.11.2020 um 15:57 schrieb Craig newman via use-livecode 
> :
> 
> Klaus.
> 
> Old fashioned way:
> Set the numberFormat to "0"
> Answer "4.21911E+11" + 0

oh, cool, thank you!

> Craig

Best

Klaus

--
Klaus Major
https://www.major-k.de
kl...@major-k.de


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


RE: Getting a real number from scientific notation

2020-11-23 Thread Craig newman via use-livecode
Klaus.

Old fashioned way:

Set the numberFormat to "0"
Answer "4.21911E+11" + 0

Craig

-Original Message-
From: use-livecode [mailto:use-livecode-boun...@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 
Cc: Klaus major-k 
Subject: Re: Getting a real number from scientific notation

Hi Paul,

> Am 22.11.2020 um 21:44 schrieb Paul Dupuis via use-livecode
:
> 
> 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 42191100 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
kl...@major-k.de


___
use-livecode mailing list
use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Getting a real number from scientific notation

2020-11-22 Thread Klaus major-k via use-livecode
Hi Paul,

> Am 22.11.2020 um 21:44 schrieb Paul Dupuis via use-livecode 
> :
> 
> 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 42191100
> 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
kl...@major-k.de


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Getting a real number from scientific notation

2020-11-22 Thread Paul Dupuis via use-livecode
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 42191100

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 
:

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
kl...@major-k.de


___
use-livecode mailing list
use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Getting a real number from scientific notation

2020-11-22 Thread Klaus major-k via use-livecode
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 
> :
> 
> 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
kl...@major-k.de


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode