Re: Avoiding Scientific Notation?
Re: Avoiding Scientific Notation?
- Subject: Re: Avoiding Scientific Notation?
- From: Paul Berkowitz <email@hidden>
- Date: Sun, 03 Jun 2001 12:27:43 -0700
On 6/3/01 10:33 AM, "Nick Hartzel, Sr." <email@hidden> wrote:
>
I'm new to applescript. I am sequencing and assigning 9 digit labels in quark
>
4.11 (using os8.6 / v1.3.7)
>
>
I need to start out with a 9 digit number, say 700100100, increment it by 1
>
and end up with a printable string. But, this number is automatically
>
reformatted by applescript to 7.001001E+8
>
>
for example this won't work (for me):
>
>
set x to 700100100
>
repeat with i from x to x + 100
>
set x to i as string
>
end repeat
>
>
Is there any way of ignoring scientific notation, or any other workaround?
Can you start out from a string? (While in Quark, can you coerce to string?)
Then this will work:
set x to "700100100"
set y to text 1 thru -4 of x
set z to (text -3 thru -1 of x) as integer
--set ls to {} --if you need whole list
repeat 100 times
set z to z + 1
set x to y & z -- coerces to string
-- set end of ls to x
end repeat
--ls
--> "700100200"
--
Paul Berkowitz