From owner-freebsd-questions@FreeBSD.ORG Mon Jun 17 19:40:26 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 297A260F for ; Mon, 17 Jun 2013 19:40:26 +0000 (UTC) (envelope-from glarkin@FreeBSD.org) Received: from mail1.sourcehosting.net (mail1.sourcehosting.net [74.205.51.45]) by mx1.freebsd.org (Postfix) with ESMTP id 045661B3A for ; Mon, 17 Jun 2013 19:40:25 +0000 (UTC) Received: from 66-189-39-69.dhcp.oxfr.ma.charter.com ([66.189.39.69] helo=Gregory-Larkins-iMac.local) by mail1.sourcehosting.net with esmtp (Exim 4.73 (FreeBSD)) (envelope-from ) id 1UofHn-000JFP-OH; Mon, 17 Jun 2013 15:40:21 -0400 Received: from Gregory-Larkins-iMac.local (localhost [127.0.0.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by Gregory-Larkins-iMac.local (Postfix) with ESMTPS id 434F22101859; Mon, 17 Jun 2013 15:40:19 -0400 (EDT) Message-ID: <51BF6622.7050209@FreeBSD.org> Date: Mon, 17 Jun 2013 15:40:18 -0400 From: Greg Larkin Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: Chris Maness References: <51BF4CF2.4060403@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.5.1 X-SA-Exim-Connect-IP: 66.189.39.69 X-SA-Exim-Mail-From: glarkin@FreeBSD.org X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail1.sourcehosting.net X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00, RCVD_IN_SORBS_DUL,RDNS_DYNAMIC,TVD_RCVD_IP,URIBL_BLOCKED autolearn=no version=3.3.1 Subject: Re: Any BASIC Gurus around? Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: 7bit X-SA-Exim-Version: 4.2 X-SA-Exim-Scanned: Yes (on mail1.sourcehosting.net) Cc: "freebsd-questions@freebsd.org" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: glarkin@FreeBSD.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jun 2013 19:40:26 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 6/17/13 3:03 PM, Chris Maness wrote: > Oops, here is another patch that includes a correction for the > missing parenthesis that Michael Ross pointed out: > > --- sun.bas.orig2013-06-17 11:51:00.000000000 -0700 +++ > sun.bas2013-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 Hi Chris, I prepared a new patch that incorporates my fixes, yours and Michael's. I found the coredump - multiple missing right parens on line 1170. Then I ran into another problem on line 430 and made an educated guess with the fix. The new patch is here, and you'll need to apply it to the original version of the program: http://people.freebsd.org/~glarkin/diffs/prog.bas.2.diff Hope that works, Greg - -- Greg Larkin http://www.FreeBSD.org/ - The Power To Serve http://www.sourcehosting.net/ - Ready. Set. Code. http://twitter.com/cpucycle/ - Follow you, follow me -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (Darwin) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlG/ZiIACgkQ0sRouByUApAjVQCfYAWvfi7sJwa6+og+jcJDsrno jaYAn1vqRecRUn8e1dqU9uI+TMlvjU3Q =9Tnl -----END PGP SIGNATURE-----