• 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: Christian Vinaa <email@hidden>
  • Date: Sat, 12 Feb 2005 17:36:54 +0100

so the short version is:


set a to "10" set b to (text -2 thru -1 of ("00" & (a + 1)))







At 17:04 +0100 12/02/2005, yvan-koenig wrote:
Le 12 févr. 2005 , à 16:57, Christian Vinaa a écrit :

just curious on a saturday afternoon where there's a snow blizzard outside
(well according to our standards its a blizzard)


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)


Hello

for my own use, I always use this trick:

set b to text -2 thru -1 of ("00" & b)

or

set b to text -3 thru -1 of ("000" & b)

Yvan KOENIG


_______________________________________________ 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


--
Christian Vinaa

email@hidden

...... Meanwhile, aunt Martha, having taken a tramp in the woods,
is lying in a ditch at the edge of town .........................
_______________________________________________
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>)
 >Re: numbers and prefix zero (From: yvan-koenig <email@hidden>)

  • Prev by Date: Re: numbers and prefix zero
  • Next by Date: Handlers in applications
  • Previous by thread: Re: numbers and prefix zero
  • Next by thread: Re: Offset in list
  • Index(es):
    • Date
    • Thread