LC converts phone number to scientific notation

Alex Tweedly alex at tweedly.net
Fri Sep 9 14:48:27 EDT 2022


No, not all are 2-digits.   USA is one digit, many are 3 digits, none 
are (yet) 4 digits.

A phone number would have a leading zero in many countries; usually 
indicating it's a non-local number (kind of similar to the leading 1- in 
long distance in the US, e.g. 1-800-555-1212). In the UK, numbers are, 
for example, 01x1 ddd nnnn, but a local number will never begin with a 0.

Alex.

On 09/09/2022 16:38, Bob Sneidar via use-livecode wrote:
> I have a function called formatPhone() I can modify it to support international notation and send it to you. Are all country codes 2 digits? And why would a phone number have a leading 0?
>
> Bob S
>
>
>> On Sep 9, 2022, at 03:00 , Klaus major-k via use-livecode <use-livecode at lists.runrev.com> wrote:
>>
>> Hi friends,
>>
>> I have a very strange problem, but also found a workaround for it.
>>
>> I first convert an 8 MB CSV file with 60000 lines to TAB delimited data, then I parse the file
>> and just extract some columns from the 60000 lines to display in a field.
>> E.g. the column "number dialled", which contains phone number like
>> -> 447973100123
>>
>> The CSV files are definitively correct but I found that in the resulting field some of these numbers
>> appear in scientific notation
>> -> 4.47888E+11
>>
>> This does not happen with phone numbers with a leading ZERO: like
>> -> 07557162491
>> So maybe this a small hint?
>>
>> However I do not even touch these items I just use:
>> ...
>> put item 9 of tLine into item 6 of tNewLine
>> ## tLine is the line from the CSV and tNewLine is for the data in the display field.
>> ...
>>
>> My simple workaround, no idea why, but it obviously works:
>> ...
>> put item 9 of tLine into ttt
>> put ttt into item 6 of tNewLine
>> ...
>> This avoids the scientific notation, what the hell is going on here?
>> Any hints welcome.
>>
>>
>> Best
>>
>> Klaus
>> --
>> Klaus Major
>> https://www.major-k.de
>> https://www.major-k.de/bass
>> 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