MediaWiki:Sitenotice:
2024-03-02: The wiki ran out of disk space, so things were not working. This has been resolved by adding another 5GB of quota ;-) Thanks to Tim Lindner for reporting the issues.
2020-05-17: If a page gives you an error about some revision not being found, just EDIT the page and the old page should appear in the editor. If it does, just SAVE that and the page should be restored. OS-9 Al (talk) 12:22, 17 May 2020 (CDT)
CALPGM: Difference between revisions
Jump to navigation
Jump to search
Luis46coco (talk | contribs) (Created page with " 100 DIM M$(12) 110 DATA JANUARY,FEBRUARY,MARCH,APRIL,MAY,JUNE 120 DATA JULY,AUGUST,SEPTEMBER,OCTOBER,NOVEMBER,DECEMBER 130 FOR I=1 TO 12 140 READ M$(I) 150 NEXT I 160 C...") |
(Category) |
||
Line 81: | Line 81: | ||
900 SOUND 220,3 | 900 SOUND 220,3 | ||
910 GOTO160 | 910 GOTO160 | ||
[[Category:BASIC]] |
Latest revision as of 20:48, 10 September 2015
100 DIM M$(12) 110 DATA JANUARY,FEBRUARY,MARCH,APRIL,MAY,JUNE 120 DATA JULY,AUGUST,SEPTEMBER,OCTOBER,NOVEMBER,DECEMBER 130 FOR I=1 TO 12 140 READ M$(I) 150 NEXT I 160 CLS 170 PRINT@3,"PERPETUAL CALENDAR PROGRAM" 180 PRINT@64,"ENTER CURRENT MONTH(1-12)";: INPUT MM 190 PRINT@106,"YEAR(1601-2399)";: INPUT YY 200 IF (MM>0) AND (MM<13) THEN 230 210 PRINT@160,"M0NTH ";MM;" INVALID--TRY AGAIN" 220 FOR T=1 TO 400: NEXT T: GOTO160 230 IF (YY>1600) AND (YY<2400) THEN 260 240 PRINT@224,"YEAR ";YY;" INVALID--TRY AGAIN" 250 FOR T=1 TO 400: NEXT T: GOTO16O 260 REM COMPUTE LEAP YR, DAYS OF MO AND WEEK 270 OF=6 280 IF YY>2000 THEN OF=0 290 OF=(OF+(YY-1600))+INT((YY-1600-1)/4)+1-INT((YY-1600-1)/100) 300 OF=OF-INT(OF/7)*7 310 LY=O 320 IF YY=INT(YY/4)*4-O THEN LY=1 330 IF YY=INT(YY/100)*100=0 THEN LY=0 340 IF YY=2000 THEN LY=1 350 IF MM=2 THEN OF=OF+3 360 IF MM=3 THEN OF=OF+3+LY 370 IF MM=4 THEN OF=OF+6+LY 380 IF MN=5 THEN OF=OF+8+LY 390 IF HM=6 THEN OF=OF+11+LY 400 IF MM=7 THEN OF=OF+13+LY 410 IF MM=8 THEN OF=OF+16+LY 420 IF HM=9 THEN OF-OF+19+LY 430 IF MM=10 THEN OF=OF+21+LY 440 IF MM=11 THEN OF=OF+24+LY 450 IF MM=12 THEN OF=OF+26+LY 460 OF=OF-INT(OF/7)*7 470 DM=31 480 IF MM=2 THEN DM=28+LY 490 IF (MM=4) OR (MM=6) OR (MM=9) OR (MN=11) THEN DM=30 500 REM DRAW LINES AND PRINT DAYS OF WEEK 510 CLS 520 PRINT@34,"SUN MON TUE WED THU FRI SAT" 530 FOR I=65 TO 93 540 PRINT@I,CHR$(131); 550 NEXT I 560 FOR I=93 TO 477 STEP 32 570 J=138 580 IF I=93 THEN J=130 590 PRINT@I,CHR$(J); 600 NEXT I 610 FOR I=477 TO 449 STEP -1 620 J=140 630 IF I=477 THEN J=136 640 PRINT@I,CHR$(J); 650 NEXT I 660 FOR I=449 TO 65 STEP -32 670 J=133 680 IF I=449 THEN J=132 690 IF I=65 THEN J=129 700 PRINT@I,CHR$(J); 710 NEXT I 720 REM PRINT CURR MONTH,YEAR 730 ML=LEN(M$(MM)) 740 PRINT@496-(ML+5)/2,M$(MM);",";YY; 750 REM PRINT CALENDAR DAYS 760 PP=0 770 FOR I=1 TO DM 780 IF I=1 THEN PP=99+(OF*4):GOTO840 790 IF (PP=187) AND (I>9) THEN PP=PP+39: GOTO840 800 IF (PP=123) OR (PP=186) OR (PP=187) THEN PP=PP+40: GOTO840 810 IF (PP=250) OR (PP=314) OR (PP=378) THEN PP=PP+40: GOTO840 820 IF I=10 THEN PP=PP+3: GOTO840 830 PP=PP+4 840 B$=STR$(I) 850 PRINT@PP,B$; 860 NEXT I 870 REM MONITOR KEYBOARD FOR RESTART 880 A$=INKEY$ 890 IF A$="" THEN 880 900 SOUND 220,3 910 GOTO160