• 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: time format, on leadZero(x)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: time format, on leadZero(x)


  • Subject: Re: time format, on leadZero(x)
  • From: Kurt Klamp <email@hidden>
  • Date: Mon, 19 Nov 2007 18:24:51 +0100


Am 19.11.2007 um 03:12 schrieb tom wible:

nifty idiom i picked up from macscripters:

on leadingZeros(x, n)
	return characters -n thru -1 of "00000000" & x

This return a list containing n characters of the zeroes string and as last item x (because of the missing brackets)


leadingZeros(225,6)
--> {"0", "0", "0", "0", "0", "0", 225}

Shouldn't it be

return text -n thru -1 of (00000000" & x)

leadingZeros(225,6)
-->"000225"


Kurt _______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Re: time format, on leadZero(x) (From: tom wible <email@hidden>)

  • Prev by Date: Re: Did 10.4.11 kill applescript?
  • Next by Date: Re: Did 10.4.11 kill applescript?
  • Previous by thread: Re: time format, on leadZero(x)
  • Next by thread: Re: time format, on leadZero(x)
  • Index(es):
    • Date
    • Thread