P706 CEEFA( 706 Sun 19 Dec 14:46/22 | B21111|b33Mjd11545147|s÷Z0|s÷Y2÷e÷b| t÷\DET|i14BBBC|k1x13Telesoftware Exmple 10 CLS : 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 bj downloaded !utomatically if the machine has a suitable adaptor or can bj typed in directly. An Explanation Follows...
P706 CEEFA( 706 Sun 19 Dec 14:43/25 |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."EMT R THE MONTH (1 TO 12)? "M 70I."EMT R THE DAY IN THE MONTH (1 TO 31)?"D:P. 80IFM=1ORM=2TH.L=1EL. =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 for 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!me program follows which can be copied down by a programmer or read bz the machine. This method of distributing computer programs is called TELESOFTWARE. Another Example Follows...
P706 CEEFAX 706 Sun 19 Dec 14:42/42 Modified Julian Date Program The program which follows calculates the 'Modified Julian Date'. This is a mum"er which is incremented each d!y and is presently over 45000. For example, instead of July the 29th 1982 you could sby 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...