Source Codes for Computing Rahu Kal

SET safe off
set talk off

use rahu

store rise to risex
store set to setx
store day to mday

ddur = (setx+720) – risex

?”Dayduration “, ddur

rdur = ddur/8

risex = risex /100

xyz = risex – int(risex)
risez = int(risex)60 + xyz100

?”Rise”, risex
?”Rise in Mins “, risez

wait”

do case
case mday = ‘Monday’
store risez + rdur to rkstart

case mday = ‘Saturday’
store risez + 2*rdur to rkstart

case mday = ‘Friday’

 store risez + 3*rdur to rkstart

case mday = ‘Wednesday’

 store risez + 4*rdur to rkstart

case mday = ‘Thursday’

 store risez + 5*rdur to rkstart

case mday = ‘Tuesday’

 store  risez + 6*rdur to rkstart

case mday = ‘Sunday’

 store  risez + 7*rdur to rkstart

endcase

?rkstart

rkstart = rkstart/60

n1 = int(rkstart)
z1 = (rkstart-n1)*60
n2 = int(z1)

if n2 = 60
n2 = 0
n1 = n1 +1
endif

set alter to rahukal.txt
set alter on

? ‘RahuKala starts from’, n1, n2,”for a duration of”, rdur

close alter

rdurx = rdur/60

?rdurx

m1 = int(rdurx)
x1 = (rdurx-m1)*60
m2 = int(x1)

if n2 = 60
n2 = 0
n1 = n1 +1
endif

rkend = n1+1

?rkend

x2 = n1 +1
?int(x1)
?n2+int(x1)

if n2+int(x1)>= 60
x2 = x2+1
endif

set alter to ra.txt
set alter on
?”Rahu Kala”
?”_

? n1,n2, “to”,x2,(n2+int(x1))%60

close alter

use rahu

repl starthours with n1
repl startmins with n2
repl endhours with x2
repl endmins with (n2+int(x1))%60

Leave a Reply

Your email address will not be published. Required fields are marked *