home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
REXXCH03.ZIP
/
TWELVDAY.CMD
< prev
Wrap
OS/2 REXX Batch file
|
1991-03-11
|
982b
|
37 lines
/* What my true love sent ... */
/* first assign the gifts to the days */
gift.1 = 'A partridge in a pear tree'
gift.2 = 'Two turtle doves'
gift.3 = 'Three French hens'
gift.4 = 'Four calling birds'
gift.5 = 'Five golden rings'
gift.6 = 'Six geese a-laying'
gift.7 = 'Seven swans a-swimming'
gift.8 = 'Eight maids a-milking'
gift.9 = 'Nine ladies dancing'
gift.10 = 'Ten lords a-leaping'
gift.11 = 'Eleven pipers piping'
gift.12 = 'Twleve drummers drumming'
/* list all gifts from the 12th day to */
/* the 1st day; refer to the discussion */
/* of loops on page 6-11. */
do day=12 to 1
say gift.day
end
/* now display the gift for a chosen day */
say "Type a number from 1 to 12."
pull day
/* check for proper input */
/* see page 9-1 */
if \ datatype(day,n) then /* if the entry is not a number */
exit
if day < 1 | day > 12 then /* same if it is out of range */
exit
say gift.day