• 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: numbers and prefix zero
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: numbers and prefix zero


  • Subject: Re: numbers and prefix zero
  • From: Bill Briggs <email@hidden>
  • Date: Sat, 12 Feb 2005 12:03:35 -0400

At 4:57 PM +0100 2/12/05, Christian Vinaa wrote:
set a to "09" as number
set b to a + 1
if b is less than "10" then
set b to "0" & b
end if
get b as text


is this the quickest way to get a result that is in 2-digits (not counting 3 or more digit versions)

i mean:

set a to "09" as number
set b to a + 1

will get you b as one digit

Typically done like this.

set n to 9
set leadingZeroForm to (text -1 through -2 of ("00" & n))

- web
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: Offset in list (From: Nigel Garvey <email@hidden>)
 >numbers and prefix zero (From: Christian Vinaa <email@hidden>)

  • Prev by Date: numbers and prefix zero
  • Next by Date: Re: numbers and prefix zero
  • Previous by thread: numbers and prefix zero
  • Next by thread: Re: numbers and prefix zero
  • Index(es):
    • Date
    • Thread