home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 2
/
DATAFILE_PDCD2.iso
/
utilities2
/
_diary
/
!Diary
/
!RunImage
(
.txt
)
< prev
next >
Wrap
RISC OS BBC BASIC V Source
|
1993-08-27
|
12KB
|
608 lines
>!RunImage
For NSW's Diary
26/08/93
>I$="1.27 (26th August 1993)":
$+" at line "+
w:p$=
p$<>""
p(p$):
$+" at line "+
&400C7,,d%
&400C8,,d%
&400C5,,d%
&400C6,,d%
17,18:
&400DD:
C:a$()="":b$()="":a%()=0:$D%="DiaryFile":$I%="ToDoToday":
e% 512,R% 256,ba% 20,ca% 512,da% 256,d% 256,ea% 512,D% 256,fa% 512,I% 256,ga% 1024,ha% 512,J% 124,r% 1024,S% 256,T% 13,ia% 30:
a$(350),b$(4),a%(35),b%(4)
$ia%="1234567890/":o%=0:$ba%="Error From Diary":G%=
:s%=0:U%=0:V%=0:
&400C0,200,&4B534154,"Diary"
ja%:l%=
"<Diary$Dir>.Sprites":L%=
#l%+16:
t% L%:!t%=L%-1:t%!4=0:t%!8=16:t%!12=16
&2E,256+10,t%,"<Diary$Dir>.Sprites":j%=
i(-1,0,0,68,68,12298,"!diary"):
&400D9,,"<Diary$Dir>.Templates":ka%=
d(ca%,da%,255,"info",t%):p%=
d(ea%,D%,255,"save",t%):v%=
d(fa%,I%,255,"save",t%):h%=
d(ga%,ha%,511,"main",t%):
&400DA
^$(da%+99)=I$:$D%="DiaryFile":$I%="ToDoToday":$(I%+112)="sfile_fff":$(D%+112)="sfile_0e1":
w:a%=J%:$a%="Diary":a%!12=459271:a%!16=160:a%!20=44:a%!24=0:
b(a%+28,0,ka%,&7091031,"Info"):
b(a%+52,0,-1,&7091031,"New File"):
b(a%+76,0,r%+700,&7091031,"Save"):
b(a%+100,128,-1,&7091031,"Quit")
&400D4,,J%
&400D4,,-1:a%=r%:$a%="Diary":a%!12=459271:a%!16=160:a%!20=44:a%!24=0:
b(a%+28,0,a%+200,&7091031,"Repeat"):
b(a%+52,0,a%+400,&7091031,"Goto"):
b(a%+76,2,a%+600,&7091031,"Edit")
b(a%+100,2,ka%,&7091031,"Info"):
b(a%+124,0,r%+700,&7091031,"Save"):
b(a%+148,128,-1,&7091031,"Quit"):a%=r%+200:$a%="Repeat":a%!12=459271:a%!16=16*14:a%!20=44:a%!24=0:
b(a%+28,0,-1,&7091031,"Daily"):
b(a%+52,0,-1,&7091031,"Weekly")
b(a%+76,0,-1,&7091031,"Monthly"):
b(a%+100,0,-1,&7091031,"Yearly"):
b(a%+124,0,-1,&7091031,"Incrementing"):
b(a%+148,128,-1,&7091031,"Off"):a%=r%+400:$a%="(dd/mm/yy)":a%!12=459271:a%!16=16*11:a%!20=44:a%!24=0
a%!28=4:a%!32=-1:a%!36=&700F101:a%!40=T%:a%!44=ia%:a%!48=11:
b(a%+52,0,-1,&7091031,"Today"):
b(a%+76,0,-1,&7091031,"Find prev"):
b(a%+100,128,-1,&7091031,"Find next"):a%=r%+600
$a%="Edit":a%!12=459271:a%!16=16*12:a%!20=44:a%!24=0:
b(a%+28,0,-1,&7091031,"Delete line"):
b(a%+52,128,-1,&7091031,"Clear today"):a%=r%+700:$a%="Save":a%!12=459271:a%!16=16*14:a%!20=44:a%!24=0
b(a%+28,0,p%,&7091031,"Whole file"):
b(a%+52,128,v%,&7091031,"Today only"):
x:x%=!d%:y%=d%!4:E%=d%!8:m%=d%!12:j%=d%!16:
2:u%=p%:
2:u%=v%:
s(x%,y%,
:q%=(j%-4):
s(x%,y%,
16,64:
p%:F$="file_0e1"
v%:F$="file_fff"
F:u%=m%
;'s%-=1:a$=a$(a%(s%)):
a$,14,1)="I"
<Lg%=
a$,"%Y"):
a$,g%-1)+
b(h%,9),14,2)-
a$,11,2))+
a$,g%+2)
a$,16):
c(h%,19,a$):
s%=35
s%=n%-1
@'s%+=1:a$=a$(a%(s%)):
a$,14,1)="I"
ALg%=
a$,"%Y"):
a$,g%-1)+
b(h%,9),14,2)-
a$,11,2))+
a$,g%+2)
a$,16):
c(h%,19,a$):
F:x%=!d%:y%=d%!4:d%!4=5:d%!8=x%-76:d%!16=x%+76:d%!12=y%-52:d%!20=y%+52:d%!24=0:d%!32=&7FFFFFFF:d%!28=0:d%!36=&7FFFFFFF:
6,161,28
,,f%:
ja%>=310
&42400,197,1,F$,d%+8,d%+24
&400D0,,d%
z:j%=d%!4:z%=d%!24:
&400DC,z%
N u%=p%
&400DC,z%
S u%=v%
h%:i%=
):i%=
n(p%):i%=
):i%=
):i%=
&400DC,z%
&400DC,z%
G:A%=
:c%=0:
:c%+=1:
8:A%=
b(h%,j%))>0:
c%=365:
c%=365B%=
a("er3"))
H:A%=
:c%=0:
:c%+=1:
8:A%=
b(h%,j%))>0:
c%=365:
c%=365B%=
a("er3"))
f:j$=
f("Sys$Date")+" "+
f("Sys$Year"):
c(h%,9,j$):
t(t$):
t$=""
a("er2")):
gQg%=0:la%=0:
t$,"/",g%)>0:g%=
t$,"/",g%)+1:la%+=1:
:s$="":r$="":q$="":
0:s$=
t$,2)
1:s$=
t$,2):r$=
t$,"/",0)+1,2)
2:s$=
t$,2):g%=0:g%=
t$,"/",g%)+1:r$=
t$,g%,2):g%=
t$,"/",g%)+1:q$=
t$,g%,4)
s$,"/",0)>0
s$,"/",0)-1)
r$,"/",0)>0
r$,"/",0)-1)
q$,"/",0)>0
q$,"/",0)-1)
s$=1s$="0"+s$
r$=1r$="0"+r$
"1992",4-
q$)+q$
D$=c$(
r$-1,0):
r$<=2
sBma%=365*
s$+31*(
r$-1)+((
q$-1)
(3/4*
q$-1)
100)+1)
:ma%=365*
s$+31*(
r$-1)-
(0.4*
r$+2.3)+
q$/4)-
(3/4*(
100)+1))
v_m$=
"Sat,Sun,Mon,Tue,Wed,Thu,Fri,",((ma%
7)*4)+1,4):j$=m$+s$+" "+D$+" "+q$:
c(h%,9,j$):
I:a$=
b(h%,q%+4):x$=b$(q%):
b$(q%)=""x$="N"
a$(M%),16)=a$
a$(M%),14,1)=x$:
{4a$(o%)=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
p$,".")=0
a("er1")):
(p$):
a$(c%)<>""
#l%,a$(c%)
&5,"SetType "+p$+" 0e1":$D%=p$:C%=
&400D4,,-1:
j$,5,2)+"/"+
j$,8,3))+"/"+
j$,4):
p$,".")=0
a("er1")):
(p$):j$=
b(h%,9):
#l%,j$+" :":
#l%,"-----------------":
o%:a$=a$(c%):w$=
a$,2):k$=
a$,3,2):l$=
a$,6,2):o$=
a$,9,4):z$=
a$,14,1):i%=
k$=c$
l$=b$
o$=n$i%=
m$<>w$i%=
m$=w$
b$<>l$i%=
m$=w$
b$=l$
n$<>o$i%=
m$=w$
c$<>k$i%=
b$<>l$i%=
c$=k$
b$<>l$i%=
c$=k$
b$=l$
n$<>o$i%=
c$=k$
b$=l$
n$<>o$
b$<>l$i%=
"Y","I":
c$=k$
b$=l$
n$<>o$i%=
i%b$(k%-4)=z$
a$,16)
&5,"SetType "+p$+" fff":C%=
&400D4,,-1:
t(J$):
e(D$):
3c%=1:
:K$=c$(c%-1,0):
K$=D$
c%),"0")+
c%+=1:
c%=13:="??"
d:u$=
b(h%,9):m$=
u$,2):c$=
u$,5,2):b$=
u$,8,3)):n$=
u$,4):
4:a$=
b(h%,k%+4):
a$<>""
x$=b$(k%):
b%(k%)=-1
g(a$)
x$=""x$="N"
2a$(o%)=m$+c$+"/"+b$+"/"+n$+" "+x$+" "+a$:o%+=1
x$<>"I"
g(a$)a$(b%(k%))=m$+c$+"/"+b$+"/"+n$+" "+x$+" "+a$
g(a$):
a$(M%),16)=a$
d:E$=
u$,3):j$=
u$,5,2):y$=
u$,8,3):v$=
u$,4):
6:d$=d$(c%):
e$=d$(c%+1)
e$=d$(0)
d$=E$
m$=e$
11:d$=c$(c%,0):
c%<11e$=c$(c%+1,0)
e$=c$(0,0)
)f$=c$(c%,1):
d$="Feb"
f$="29"
d$=y$
j$=f$
g$=e$:h$="01"
g$=y$:h$=
j$+1)
h$=1h$="0"+h$
y$="Dec"
j$="31"
v$+1)
i$=v$
:j$=m$+","+h$+" "+g$+" "+i$:
c(h%,9,j$):
d:E$=
u$,3):j$=
u$,5,2):y$=
u$,8,3):v$=
u$,4):
6:e$=d$(c%):
c%<6d$=d$(c%+1)
d$=d$(0)
d$=E$
m$=e$
11:e$=c$(c%,0):
c%<11d$=c$(c%+1,0)
d$=c$(0,0)
"f$=c$(c%,1):
e$="Feb"
100=0
400=0:f$="29"
100=0
400<>0:f$="28"
100<>0f$="29"
d$=y$
j$="01"
g$=e$:h$=f$
g$=y$:h$=
j$-1)
h$=1h$="0"+h$
y$="Jan"
j$="01"
v$-1)
i$=v$
:j$=m$+","+h$+" "+g$+" "+i$:
c(h%,9,j$):
m(pa%):
h(h%,j%+1,
b(h%,j%+1)))
h(h%,4,
b(h%,4)))
h(h%,j%-1,
b(h%,j%-1)))
h(h%,8,
b(h%,8)))
C$="TRUE"
2:u%=p%:
3:G%=
0:b$(q%)="D"
1:b$(q%)="W"
2:b$(q%)="M"
3:b$(q%)="Y"
4:b$(q%)="I"
5:b$(q%)=""
c(h%,q%+10,b$(q%))
t($T%)
K(q%+4)
4:u%=p%:
5:G%=
&400CF,,d%:
(d%!8
C$="TRUE"
&400D4,,J%
&400D4,,r%
L:m$=
j$,2):c$=
j$,5,2):b$=
j$,8,3)):n$=
j$,4):k%=4:
o%:a$=a$(c%):w$=
a$,2):k$=
a$,3,2):l$=
a$,6,2):o$=
a$,9,4):
m$=w$
c$=k$
b$=l$
n$=o$
a$(c%)=""
4:b$(k%)="":
c(h%,k%,""):
k%=10
c(h%,k%,""):
K(k%):a$=
b(h%,k%):
a$(c%),16)=a$
a$(c%)=""
c(h%,k%,""):
c(h%,k%+6,""):
n(h%):
s(qa%,N%,ra%):$T%="":
..C$="TRUE":N%=272:
&400D4,,J%,qa%-64,N%
:N%+=16:C$="FALSE":
&400D4,,r%,qa%-64,N%
d%!16
0:G%=
3,5:sa%=d%!40:
sa%<>225
M:C%=
p(p$):
1282:
c(L$):ta%=U%:U%=
U%-ta%<200
V%+=1
&400DD:
&400EF,0:R%!0=255:$(R%+4)=L$:
&400DF,R%,18,ba%
,ua%:=ua%
b(m%,j%):!e%=m%:e%!4=j%:
262350,,e%:=$(e%!28)
i(m%,va%,wa%,xa%,ya%,_%,a$):e%!0=m%:e%!4=va%:e%!8=wa%:e%!12=xa%:e%!16=ya%:e%!20=_%:$(e%+24)=a$:
&400C2,,e%
F%:=F%
M:d%!12=d%!8:d%!16=4:
&400E7,17,d%,d%!4:
n(F%):
O:!e%=F%:
262347,,e%:
P:K%=
e%!28=-1:
262341,,e%:
O:e%!0=4:e%!4=5:e%!8=11:e%!12=12:e%!16=-1:
&31,e%,e%+20:za%=1<<(e%!20):Aa%=1<<(e%!24):Ba%=(e%!28+1)*za%:Ca%=(e%!32+1)*Aa%:
P:W%=e%!12-e%!4:H%=e%!16-e%!8:X%=(Ba%-W%)/2:Y%=(Ca%-H%)/2:e%!4=X%:e%!8=Y%:e%!12=X%+W%:e%!16=Y%+H%:
c(m%,j%,G$):!e%=m%:e%!4=j%:
262350,,e%:
($e%!28)<>G$
$(e%!28)=G$:e%!8=0:e%!12=0:
262349,,e%
J:x%=0:
A$," ",x%)>0:x%=
A$," ",x%)+1:
A$-x%+1)
h(m%,j%,Da%):
&400D2,m%,j%,-1,-1,-1,Da%:
&39,,"DragASprite_Stop"
&42401
&400D0,,0:b%=d%:
&400CF,,b%:x%=b%!0:y%=b%!4:m%=b%!12:j%=b%!16:!b%=56:b%!12=0:b%!16=1:b%!20=m%:b%!24=j%:b%!28=x%:b%!32=y%:b%!36=924:b%!40=3314:$(b%+44)=
b(u%,0)):
&400E7,17,d%,m%,j%:C%=
j(B$):
B$,".")>0:B$=
B$,".")+1):
f(M$):
&23,M$,S%,255,0,3
,,b%:S%?b%=13:=$S%
Q-p$="":g%=d%+43:
g%?1<>0:g%+=1:p$+=
b(u%,0)
b(O%,Fa%,g%,_%,a$):O%!0=Fa%:O%!4=g%:O%!8=_%:$(O%+12)=a$:
D:l%=
"<Diary$Dir>.Messages":P%=0:
H$<>""
H$,1)<>"#"
P%+=