• 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: How can I format an integer ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can I format an integer ?


  • Subject: Re: How can I format an integer ?
  • From: Luther Fuller <email@hidden>
  • Date: Sat, 25 Oct 2008 18:52:14 -0500

On second thought, this works better ...

on format(nr, formatChar)
	set chunkList to {}
	repeat
		set chunk to (nr mod 1000) as integer
		if chunk = 0 then exit repeat
		set chunkList to {chunk} & chunkList
		set nr to nr div 1000
	end repeat
	set AppleScript's text item delimiters to {formatChar}
	return chunkList as text
end format ------------------

_______________________________________________
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: 
 >How can I format an integer ? (From: Emile SCHWARZ <email@hidden>)

  • Prev by Date: Re: AppleScript strings fail
  • Next by Date: Re: How can I format an integer ?
  • Previous by thread: Re: How can I format an integer ?
  • Next by thread: Re: How can I format an integer ?
  • Index(es):
    • Date
    • Thread