Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Jun 2013 12:03:47 -0700
From:      Chris Maness <chris@chrismaness.com>
To:        glarkin@freebsd.org,  "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   Re: Any BASIC Gurus around?
Message-ID:  <CANnsUME-1iYSMHSVyMZW2dpt-mzNbp6R-eBRFAM06duvg9FWkQ@mail.gmail.com>
In-Reply-To: <CANnsUMGtYibAYkn-e2_83PMEvJ=p0JpPjchAkvVZhzBLT4pMkA@mail.gmail.com>
References:  <CANnsUMG-2yaGgY-_aXtt2UTTRPCGFgFzhE0_sF74%2B%2Bsaw5Uy1g@mail.gmail.com> <51BF4CF2.4060403@FreeBSD.org> <CANnsUMGtYibAYkn-e2_83PMEvJ=p0JpPjchAkvVZhzBLT4pMkA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Oops, here is another patch that includes a correction for the missing
parenthesis that Michael Ross pointed out:

--- sun.bas.orig 2013-06-17 11:51:00.000000000 -0700
+++ sun.bas 2013-06-17 11:57:55.000000000 -0700
@@ -104,7 +104,7 @@
 1020 ON N GOTO 1030, 1090
 1030 IS=133775.*M/SK
 1040 PRINT "SUN AZIMUTH (DEG.) ";AZ
-1050 PRINT "SUN ALTITUDE (DOG.) ";HA
+1050 PRINT "SUN ALTITUDE (DEG.) ";HA
 1060 PRINT "SUN ILLUMINANCE (LUX) ";IS
 1070 N=2
 1080 GOTO 940
@@ -200,7 +200,7 @@
 1980 DS=FNARCSIN(SD)
 1990 RETURN
 2000 H=(A(L)-SI*SD)/(CI*COS(D))S
-2010 IF ABS(H>1. THEN GOTO 2040
+2010 IF ABS(H)>1. THEN GOTO 2040
 2020 H=FNARCOS(H)*RD/C
 2030 RETURN
 2040 H=1.5

Thanks, guys.  It will be cool if I can figure out why the interpreter is
core dumping.

Chris Maness



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANnsUME-1iYSMHSVyMZW2dpt-mzNbp6R-eBRFAM06duvg9FWkQ>