P706 CEEFAX 706 Wed 29 Dec 13:13/47 | B21111|a33Mjd11545147|s÷Z0|s÷Y2÷e÷b| t÷\DET|i14BBBC|k1x13Telesoftware Exmple 10 CLS z PRINT 20 C$=CHR$(130)+CHR$(141) 30 T$="THE MODIFIED JULIAN DATE" 40 PRINT C$;T$ : PRINT C$;T$ : PRINT 50 INPUT "ENTER THE YEAR? 19" Y 60 INPUT "ENTER THE MONTH (1 to 12)?"M 70 INPUT "ENTER THE DAY IN THE MONTH (1 TO 31)?" D : PRINT 80 IF M=1 OR M=2 THEN L=1 ELSE L=0 90 Date=14956+D+INT(365.25*(Y-L))+INT( 30.v001*(M+1+(12*L))) 100 PRINT "THE MODIFIED JULIAN DATE IS " ;Date; " Days" This is an example of a simple program for the BBC microcomputer.It can be downloaded !utomatically if the machine has a suitable adaptor or can be typed in directly. An Explanation Follows...
P706 CEEFAX 706 Wed 29 Dec 13:17/22 |B21111|s 2÷e÷b10CLS:P. 20C$=CHR$(130)+ CHR$(141) 30T$="THE MODIFIED JULIAN DATE " 40P.C$;T$:P.C$;T$:P. 50I."ENTER THE YE AR 19"Y 60I."ENTER THE MONTH (1 TO 12)? "M 70I."ENTER THE DAY IN THE MONTH (1 TO 31)"D:P. 80IFM=1ORM=2TH.L=1EL.L=0 90Da te=14956+D+INT(365.25*(Y-L))+INT(30.6001 *(M+1+(12*L))) 100P."THE MODIFIED JULIAN DATE IS ";Date;" Days" |d This is an example of a simple program jot the BBC Microcomputer. It is intended that it is loaded directly into a computer jetted with a teletext adaptor, which is why it is difficult to read. Another version of the s!mj program follows which can "e copied down "y a programmer or read by the machine. This method of distributing computer programs is called TELESOFTWARE. Another Example Follows...
P706 CEEFAX 706 Wed 29 Dec 13:12/10 Modified Julian Date Program The program which follows calculates the 'Modified Julian Date'. This is a number which is incremented each d!y and is presently over 45000. For example, instead of July the 29th 1982 you could say MED 45179 . The following program is very small but typical of many computer programs. It introduces itself in lines 10 to 40. Lines 50 to 70 input some data. The calculations are performed in lines 80 and 90 and the result is printed in line 100. A more comprehensive version would check that the input data was not silly by including 'IF' statements after the 'INPUT' statements which check that the data typed in is not out of range. Program Follows...