Looking through the listings of past News Letters it would appear no one has published an article on this ‘ old chestnut ‘ ; so here is my interpretation. I must admit it is based on a very ancient program published in a book dated 1983, - just another of my upgrades.
Strange as may seem I understand
some in the medical profession take the subject of Biorhythms
quite seriously. The program is fairly straightforward, relying on the
proverbial large Textbox to accept the date of interest and birthday.
Note thr trapclose [nopass] instead of [quit] to prevent someone trying
to close just the text box instead the whole program! An opening
reminder is displayed, how to capture the screen for printouts etc,
with most versions of Windows.
Some may prefer to select a date of interest say a week earlier, to try to explain and earlier disaster or disappointment in their lives!! It is quite easy to change the parameters to cover a shorter of longer period than 60 days.
As I always qote 'Comments are always welcome in the Conforum'
nomainwin
ux = 1 : uy = 1
if DisplayWidth > 1000 then ux = 120 : uy = 90
UpperLeftX = ux : UpperLeftY = uy
WindowWidth = 800 : WindowHeight = 580
menu #b, "&OPTIONS","&New",[start],|,"&Exit", [quit]
open "BIORHYTHMS - see Options" for graphics_nsb as #b
#b "trapclose [quit]"
DIM Q(12) : bx = 0 : restore [dats]
FOR N = 1 TO 12: READ dat : Q(N) = dat: NEXT N
[start]
#b "discard; down; fill cyan; place 140 120; font arial 24 bold"
#b "\ BIORHYTHMS FOR ANY 60 DAYS "
#b "font arial 14 bold; place 120 160"
#b "\ Leave the name blank if preferred. Press Alt+Print to capture"
#b "\ the Screen to the Clipboard, and to Paste to other software. "
UpperLeftX = 150 + ux : UpperLeftY = 400 + uy
WindowWidth = 500: WindowHeight = 150
statictext #4, "ENTER DATES", 10, 20, 50, 40
statictext #4, "Day of interest 1-31", 70, 2, 60, 30
statictext #4, "Month of interest 1-12", 140, 2, 60, 30
statictext #4, "Year of interest", 220, 2, 60, 30
statictext #4, "Day of birth 1-31", 286, 2, 50, 30
statictext #4, "Month of birth 1-12", 350, 2, 60, 30
statictext #4, "Year of birth", 430, 2, 40, 30
statictext #4, "Name", 30, 84, 40, 30
textbox #4.tbox1, 80, 30, 30, 25
textbox #4.tbox2, 150, 30, 30, 25
textbox #4.tbox3, 220, 30, 30, 25
textbox #4.tbox4, 290, 30, 30, 25
textbox #4.tbox5, 360, 30, 30, 25
textbox #4.tbox6, 430, 30, 30, 25
textbox #4.tbox7, 80, 80, 250, 25
button #4.default, "Accept", [pass], UL, 420, 80, 42, 25
open "Click ACCEPT or press Enter" for dialog as #4
#4 "trapclose [nopass]"
bx=4 : print #4.tbox1, "!setfocus"
[nopass]
playwave "ping.wav" : #b "flush" : wait
[pass]
print #4.tbox1, "!contents? A$" : DI = val(A$)
print #4.tbox2, "!contents? B$" : MI = val(B$)
print #4.tbox3, "!contents? C$" : YI = val(C$)
print #4.tbox4, "!contents? D$" : DB = val(D$)
print #4.tbox5, "!contents? E$" : MB = val(E$)
print #4.tbox6, "!contents? F$" : YB = val(F$)
print #4.tbox7, "!contents? F$" : name$ = (G$)
if name$="" then name$="ANYONE"
if DI<1 or MI <1 or YI<1 then goto [bad]
if DB<1 or MB<1 or YB < 1 then goto [bad]
if DI>31 or MI>12 then goto [bad]
if DB>31 or MB>12 then goto [bad]
IF YI 5 then #b "place ";ruler-8;" 262"
#b "\";count
count = count +10
next ruler
beep : wait
[plots]
#b "place 5 250"
FOR X = 5 TO 785 STEP 8
Y = INT(400 * SIN(2 * PI * (DA + X / S) / P) + 750)
Y = (Y / 3) *.609 : Y = 530 - Y
#b "goto ";X;" ";Y-130
NEXT X
RETURN
[days]
' DTY days this year. ' DSO days since 0.
DTY = Q(M) + D
DSO = DTY + Y * 365 + INT(Y / 4) + 1 - INT(Y / 100) + INT(Y / 400)
IF Y MOD 4 = 0 AND M < 3 THEN DSO = DSO - 1
RETURN
[bad]
notice "INVALID ENTRY!!" : goto [nopass]
[quit]
if bx = 4 then close #4
close #b : end
[dats]
DATA 0,31,59,90,120,151,181,212,243,273,304,334