home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 1B
/
DATAFILE_PDCD1B.iso
/
_pocketbk
/
pocketbook
/
004
/
oplexamp_z
/
ALM.OPL
< prev
next >
Wrap
Text File
|
1992-08-26
|
640b
|
25 lines
PROC alm:
LOCAL h%,a&(2),a$(64),b$(65),d&,t&,t2&,a%,r%,s%
r%=IOOPEN(h%,"ALM:",0)
IF r%<0 :RAISE r% :ENDIF
d&=DAYS(DAY,MONTH,YEAR) REM today
t&=DATETOSECS(1970,1,1,HOUR,MINUTE,0)
DINIT "Set alarm"
DTIME t&,"Time",0,0,DATETOSECS(1970,1,1,23,59,59)
DDATE d&,"Date",d&,DAYS(31,12,2049)
DTIME t2&,"Alarm advance time",2,0,86399
DEDIT a$,"Message"
IF DIALOG
a&(2)=86400*(d&-25567)+t&
a&(1)=a&(2)-t2&
b$=a$+CHR$(0)
a%=ADDR(b$)
r%=IOA(h%,2,s%,a&(),#a%+1)
IF r%<0 :RAISE r% :ENDIF
ENDIF
r%=IOCLOSE(h%)
IF r%<0 :RAISE r% :ENDIF
ENDP