• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Avoiding Scientific Notation?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Avoiding Scientific Notation? (From: "Nick Hartzel, Sr." <email@hidden>)

  • Prev by Date: Re: Current date in standard additions dictionary
  • Next by Date: Folder Actions Plus 1.1b3 doesn't seem to work on my G3 running MacOS 8.6
  • Previous by thread: Avoiding Scientific Notation?
  • Next by thread: Re: Avoiding Scientific Notation?
  • Index(es):
    • Date
    • Thread