home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
historic
/
v941.tgz
/
icon.v941src.tar
/
icon.v941src
/
ipl
/
progs
/
qt.icn
< prev
next >
Wrap
Text File
|
2000-07-29
|
1KB
|
48 lines
############################################################################
#
# File: qt.icn
#
# Subject: Program to announce time in English
#
# Author: Robert J. Alexander
#
# Date: November 26, 1996
#
############################################################################
#
# This file is in the public domain.
#
############################################################################
#
# 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.
#
############################################################################
#
# Links: datetime
#
############################################################################
link datetime
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