home *** CD-ROM | disk | FTP | other *** search
- ############################################################################
- #
- # File: qt.icn
- #
- # Subject: Program to announce time in English
- #
- # Author: Robert J. Alexander
- #
- # Date: May 20, 1992
- #
- ###########################################################################
- #
- # Usage: qt [-a]
- #
- # If -a is present, only the time is printed (for use in scripts), e.g.:
- #
- # just after a quarter to three
- #
- # otherwise, the time is printed as a sentence:
- #
- # It's just after a quarter to three.
- #
- ############################################################################
-
- link saytime
-
- procedure main(arg)
- local pre,suf
- if arg[1] == "-a" then {
- pop(arg)
- pre := suf := ""
- }
- else {
- pre := "It's "
- suf := "."
- }
- arg[1] | put(arg)
- every write(pre,saytime(!arg),suf)
- end
-