• 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
Subroutine Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Subroutine Question


  • Subject: Subroutine Question
  • From: Marconi <email@hidden>
  • Date: Sun, 18 Apr 2010 10:56:27 -0700

What's the correct syntax to code a subroutine which does not need any input parameters passed to it but does get a value back?

I have to pass something unnecessary like so:

set start_Time to EpochSeconds(1)

on EpochSeconds(x)
	return do shell script "date -j -f \"%a %b %d %T %Z %Y\" \"`date`\" \"+%s\""
end EpochSeconds



I can't just do:

set start_Time to EpochSeconds

on EpochSeconds
	return do shell script "date -j -f \"%a %b %d %T %Z %Y\" \"`date`\" \"+%s\""
end EpochSeconds


What's the best way to set my start_Time to the value returned by my EpochSeconds subroutine?




--
Geeks and Nerds: <http://www.otfb.com/blog/?p=918>
_______________________________________________
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
  • Follow-Ups:
    • Re: Subroutine Question
      • From: Richard Lake <email@hidden>
    • Re: Subroutine Question
      • From: Wayne Melrose <email@hidden>
  • Prev by Date: Re: OSAScript class reference
  • Next by Date: Re: Subroutine Question
  • Previous by thread: Re: OSAScript class reference
  • Next by thread: Re: Subroutine Question
  • Index(es):
    • Date
    • Thread