• 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: getting the date
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting the date


  • Subject: Re: getting the date
  • From: Graff <email@hidden>
  • Date: Tue, 30 Dec 2003 16:06:00 -0500

On Dec 30, 2003, at 3:48 PM, Walter Ian Kaye wrote:

At 12:36p -0500 12/30/2003, Graff didst inscribe upon an electronic papyrus:

on ZeroPad(theNumber)
set theString to ""
if theNumber is less than 10 then set theString to "0"
set theString to theString & theNumber
return theString
end ZeroPad

You could shorten that to:

on ZeroPad(theNumber)
set theString to ""
if theNumber is less than 10 then set theString to "0"
theString & theNumber
end ZeroPad

The last result is always returned.

True. However, I always like to spell stuff out - it makes things clearer when you or someone else has to go back and read the script.

- Ken
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >getting the date (From: Simon Kidd <email@hidden>)
 >Re: getting the date (From: Graff <email@hidden>)
 >Re: getting the date (From: Walter Ian Kaye <email@hidden>)

  • Prev by Date: Re: getting the date
  • Next by Date: Re: [OT] Verification required?
  • Previous by thread: Re: getting the date
  • Next by thread: Zero pad (was: getting the date)
  • Index(es):
    • Date
    • Thread