8-Bit Software Online Conversion
Let's Compute Calendar - Listing
5REM SAVE"CALNDER"
10REM CALENDAR
11REM This CALENDAR was first issued
in LET'S COMPUTE! in January 1991 and is
printed here with the kind permission of
Steve Turner the Editor of Acorn User on
November 21 1996, Fred Price.
20REM (C) LET'S COMPUTE!
30MODE 0
40LET W=80
50 LET S$=" ":FOR I=1 TO 3:LET S$=S
$+S$:NEXTI:REM THERE ARE THREE SPACES BE
TWEEN THE QUOTES
60LET MW=INT (W/24):LET MARGIN=INT ((
W-24*MW)/2)
70DIM M$(12):DIM T(12):DIM W$(6,3)
80FOR I=1 TO 12
90READ M$(I),T(I)
100NEXT I
110LET D$=" SU MO TU WE TH FR SA "
120INPUT "Printer or screen (P/S)";P$
130INPUT"What year"; YEAR
140CLS
150LET B$="":IF W>33 THEN LET B$=LEFT$
(S$,INT((W-32)/2))
160LET A$=B$+"The Let's Compute Calend
ar "+STR$(YEAR)
170GOSUB 570
180LET A$=" ":GOSUB 570
190READ A$:IF A$<>"end" THEN LET A$=B$
+A$:GOSUB 570:GOTO 190
200GOSUB 600
210LET T(2)=28
220LET Y4=INT (YEAR/4):LET SD=YEAR+Y4-
7*INT ((YEAR+Y4)/7)
230IF YEAR=4*Y4 THEN LET SD=SD-1:LET T
(2)=29
240LET X=(SD-1)*3+1
250IF SD<=0 THEN LET X=X+21
260LET MNTH=0
270REM
280FOR J=1 TO MW
290LET R=1
300LET X$=LEFT$(S$,X)
310FOR I=1 TO T(MNTH+J)
320LET T=INT (I/10)
330LETU=I-10*T+48:LET T=T+48
340IF T=48 THEN LET T=32
350LET X$=X$+" "+CHR$(T)+CHR$(U)
360LET SD=(SD+1)
370LET X=(X+3)
380 IF X>21 THEN LET X=1:LET W$(R,J)=L
EFT$(X$+S$,24):LET R=R+1:LET X$=" "
390NEXT I
400LET W$(R,J)=LEFT$(X$+S$,24)
410LET R=R+1:IF R<7 THEN LET W$(R,J)=S
$:GOTO410
420NEXT J
430LET A$=" ":GOSUB 570:LET A$=LEFT$(S
$,MARGIN)
440FOR J=1 TO MW:LET A$=A$+LEFT$(" "+
M$(MNTH+J)+S$,24):NEXT J
450GOSUB 570:LET A$=" ":GOSUB 570:LET
A$=LEFT$(S$,MARGIN)
460FOR J=1 TO MW: LET A$=A$+D$:NEXT J
470FOR R=1 TO 6
480GOSUB 570:LET A$=LEFT$(S$,MARGIN)
490FOR J=1 TO MW
500LET A$=A$+W$(R,J)
510NEXT J
520NEXT R
530GOSUB 570
540GOSUB 600
550LET MNTH=MNTH+MW:IF MNTH<12 THEN GO
TO 270
560END
570REM PRINT A$
580IF P$="P" OR P$="p" THEN VDU2
590PRINT A$:VDU3:RETURN
600REM WAIT FOR SPACE
610IF P$="P" ORP$="p" THEN RETURN
620AA=GET
630RETURN
640REM MONTH DATA
650DATA "JANUARY",31
660DATA "FEBRUARY",28
670DATA "MARCH",31
680DATA "APRIL",30
690DATA "MAY",31
700DATA "JUNE",30
710DATA "JULY",31
720DATA "AUGUST",31
730DATA "SEPTEMBER",30
740DATA "OCTOBER",31
750DATA "NOVEMBER",30
760DATA "DECEMBER",31
770DATA" /*½/*½ Mabel"
780DATA" ****** Says"
790DATA"½`**O**O**`/ Welcome"
800DATA"``***<>***`` To "
810DATA" * **** * Lets"
820DATA" /** **½ Compute"
830DATA" ******"
840DATA" **"
850DATA" *OO*"
870DATA" *OOOO*"
880DATA" *OOOOOO*"
890DATA" **OOOO** *"
900DATA" ***OO*** ***"
910DATA" ******** 000"
920DATA" **==OO==** ***"
930DATA" **==OO==** 000"
940DATA" **==OO==** ***"
950DATA" **==OO==** 000"
960DATA" **==OO==** 0**"
970DATA"***==OO==**0*0*0"
980DATA"***==OO==**0*0*"
990DATA" **nnnnnn**"
1000DATA"##################"
1010DATA"end"