home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / pocketbk / developmen / oplexamp / ALARMS.OPL < prev    next >
Text File  |  1992-08-26  |  424b  |  28 lines

  1. PROC alarms:
  2.     local r%,acb%
  3.     local t1&,t2&,m$(20)
  4.     local h%,dayinc%
  5.     r%=ioopen(acb%,"ALM:",-1)
  6.     if r% :raise r% :endif
  7.     while 1
  8.         dayinc%=0
  9.         h%=hour
  10.         if h%<7
  11.             h%=7
  12.         elseif h%<12
  13.             h%=12
  14.         elseif h%<17
  15.             h%=17
  16.         elseif h%<23
  17.             h%=23
  18.         else
  19.             dayinc%=1
  20.             h%=7
  21.         endif
  22.         t1&=datetosecs(year,month,day+dayinc%,h%,0,0)
  23.         t2&=t1&
  24.         m$="Don't forget!"
  25.         iow(acb%,2,t1&,#addr(m$)+1)
  26.     endwh
  27. ENDP
  28.