Ubuntu Peronista@lemmy.sdf.org to retrocomputing@lemmy.sdf.org · 1 year agoBASIC for the Masseslemmy.sdf.orgimagemessage-square5fedilinkarrow-up11arrow-down10file-text
arrow-up11arrow-down1imageBASIC for the Masseslemmy.sdf.orgUbuntu Peronista@lemmy.sdf.org to retrocomputing@lemmy.sdf.org · 1 year agomessage-square5fedilinkfile-text
You are a BASIC removed, so type-in and share your BASIC listings here. Any and all BASIC dialects are welcome.
minus-squareUbuntu Peronista@lemmy.sdf.orgOPlinkfedilinkarrow-up1·1 year ago10 : CLEAR : PAUSE “Mini Moon Age Calculator “ 20 : W=694098 : X=29.53 : Z=365.25 : JN=2460202.6 : REM Julian date for last moon on 25/9/2023 at 2:39am 30 : INPUT “DAY:” ; D , “MONTH:” ; M , “YEAR:” ; Y 40 : IF M<=2 LET Y=Y-1 : M=M+12 50 : A=INT(Y/100) : B=INT(A/4) : C=2-A+B : E=INT(Z * (Y+4716)) 60 : F=INT(30.6001 * (M+1)) : JD=C+D+E+F-1524.5 : DS=JD-JN 70 : S=(DS/X-INT(DS/X)) * X : S=INT(S+.5) 80 : PRINT “Age of Moon “ ; USING “###.# “ ; S ; “_days” : END Stay SHARP!
minus-squareScott@mastodon.sdf.orglinkfedilinkarrow-up1·1 year ago@peron cool routine. @guofu : note computation of Julian Date. and then some trig for the periodic part(s)
10 : CLEAR : PAUSE “Mini Moon Age Calculator “ 20 : W=694098 : X=29.53 : Z=365.25 : JN=2460202.6 : REM Julian date for last moon on 25/9/2023 at 2:39am 30 : INPUT “DAY:” ; D , “MONTH:” ; M , “YEAR:” ; Y 40 : IF M<=2 LET Y=Y-1 : M=M+12 50 : A=INT(Y/100) : B=INT(A/4) : C=2-A+B : E=INT(Z * (Y+4716)) 60 : F=INT(30.6001 * (M+1)) : JD=C+D+E+F-1524.5 : DS=JD-JN 70 : S=(DS/X-INT(DS/X)) * X : S=INT(S+.5) 80 : PRINT “Age of Moon “ ; USING “###.# “ ; S ; “_days” : END
Stay SHARP!
@peron
cool routine.
@guofu : note computation of Julian Date. and then some trig for the periodic part(s)