Re: Any BASIC Gurus around?
As you need max syntax checking from OCR, throw it at as many different basic interpreters/ compilers as you can, inspect where each bleats, some error messages may be more less usefull for different errors. A friend of mine wrote a basic decades back, its in /usr/ports/lang/pbasic/ PS to find mis-matched brackets, try my http://www.berklix,com/~jhs/src/bsd/jhs/bin/public/brackets/ Cheers, Julian -- Julian Stacey, BSD Unix Linux C Sys Eng Consultant, Munich http://berklix.com Reply below not above, like a play script. Indent old text with . Send plain text. No quoted-printable, HTML, base64, multipart/alternative. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Any BASIC Gurus around?
On 06/17/13 20:40, Greg Larkin wrote: 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 Hi Chris and Greg, I have gone through the code and found a load more differences. I dont know if the sun and moon positions are correct though As a side note, the the first page of code on the PDF page number 5 is different from the PDF page number 34. I have used page numbers 34 - 38 as my code reference. I have a patch file at http://www.caspersworld.co.uk/FreeBSD/basic.diff HTH Paul ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Any BASIC Gurus around?
On Tue, Jun 18, 2013 at 4:31 AM, Paul Wootton paul-free...@fletchermoorland.co.uk wrote: On 06/17/13 20:40, Greg Larkin wrote: 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.diffhttp://people.freebsd.org/~glarkin/diffs/prog.bas.2.diff Hope that works, Greg Hi Chris and Greg, I have gone through the code and found a load more differences. I dont know if the sun and moon positions are correct though As a side note, the the first page of code on the PDF page number 5 is different from the PDF page number 34. I have used page numbers 34 - 38 as my code reference. I have a patch file at http://www.caspersworld.co.uk/**FreeBSD/basic.diffhttp://www.caspersworld.co.uk/FreeBSD/basic.diff HTH Paul Paul, which version did you patch for? It doesn't seem to be the latest or the original. If you want to post the whole file. I can figure out if you are missing any of the other contributions out there. I think there were a total of three patches before yours. Thanks, Paul Chris Maness ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Any BASIC Gurus around?
On 06/18/13 15:01, Chris Maness wrote: On Tue, Jun 18, 2013 at 4:31 AM, Paul Wootton paul-free...@fletchermoorland.co.uk wrote: On 06/17/13 20:40, Greg Larkin wrote: 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.diffhttp://people.freebsd.org/~glarkin/diffs/prog.bas.2.diff Hope that works, Greg Hi Chris and Greg, I have gone through the code and found a load more differences. I dont know if the sun and moon positions are correct though As a side note, the the first page of code on the PDF page number 5 is different from the PDF page number 34. I have used page numbers 34 - 38 as my code reference. I have a patch file at http://www.caspersworld.co.uk/**FreeBSD/basic.diffhttp://www.caspersworld.co.uk/FreeBSD/basic.diff HTH Paul Paul, which version did you patch for? It doesn't seem to be the latest or the original. If you want to post the whole file. I can figure out if you are missing any of the other contributions out there. I think there were a total of three patches before yours. Thanks, Paul Chris Maness Hi Chris, I used the code from the first post and compared against the PDF. I did try checking against the various diffs and I think I have them all covered. I full file is at http://www.caspersworld.co.uk/FreeBSD/basic-moon.bas Paul ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Any BASIC Gurus around?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 6/17/13 1:16 PM, Chris Maness wrote: I am having trouble getting this old USNO basic program running in bwBASIC. The error output is not clear to me where the problem is. Here is the code, if someone wouldn't mind running it and suggesting edits: ...setting wayback machine to ca. 1979... Here is a patch to apply to your code that gets the program a little further: http://people.freebsd.org/~glarkin/diffs/prog.bas.diff There were some O characters that should have been 0 instead and at least a couple of Unicode characters that I removed. It prints out some results up to the moon illuminance, and then bwBasic core dumps, but maybe you'll be able to debug from there. Good luck, 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/TPIACgkQ0sRouByUApDxQwCggXDVspM4GF2dlI5EvlmUsvld qtYAn2NeBVSPHJ8p4nEYvN80bbXZGecr =Z9tY -END PGP SIGNATURE- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Any BASIC Gurus around?
I'm no BASIC Guru, but this one line caught my eye while scrolling through your mail: 2010 IF ABS(H1. THEN GOTO 2040 Missing parenthesis? Regards, Michael ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Any BASIC Gurus around?
Thanks a ton Greg. It is crashing here too. I am not sure as to the cause. I made a small patch to place on top of yours. There is a typo that outputs the sun position as DOG instead of DEG. Here it is: --- sun.bas.orig 2013-06-17 11:51:00.0 -0700 +++ sun.bas 2013-06-17 11:44:06.0 -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 Regards, Chris Maness On Mon, Jun 17, 2013 at 10:52 AM, Greg Larkin glar...@freebsd.org wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 6/17/13 1:16 PM, Chris Maness wrote: I am having trouble getting this old USNO basic program running in bwBASIC. The error output is not clear to me where the problem is. Here is the code, if someone wouldn't mind running it and suggesting edits: ...setting wayback machine to ca. 1979... Here is a patch to apply to your code that gets the program a little further: http://people.freebsd.org/~glarkin/diffs/prog.bas.diff There were some O characters that should have been 0 instead and at least a couple of Unicode characters that I removed. It prints out some results up to the moon illuminance, and then bwBasic core dumps, but maybe you'll be able to debug from there. Good luck, 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/TPIACgkQ0sRouByUApDxQwCggXDVspM4GF2dlI5EvlmUsvld qtYAn2NeBVSPHJ8p4nEYvN80bbXZGecr =Z9tY -END PGP SIGNATURE- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Any BASIC Gurus around?
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.0 -0700 +++ sun.bas 2013-06-17 11:57:55.0 -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(H1. 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 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Any BASIC Gurus around?
-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.0 -0700 +++ sun.bas2013-06-17 11:57:55.0 -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(H1. 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- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Any BASIC Gurus around?
On closer inspection it looks like the moons in the right spot, but the Sun is in the wrong spot. I will take a look and see if there is no error in the lines that deal with the Sun's Az/El. I have the original code that was scanned from a USNO document. The OCR was rather sloppy. I will post the original in a minute and send the link. Thanks, again Chris Maness On Mon, Jun 17, 2013 at 1:24 PM, Chris Maness ch...@chrismaness.com wrote: Thanks a ton Greg, it works great. The only thing I that seems to be an issue of I use Zulu time. According to the ephemeris the time seems to be wrong when I use Zulu time. I would have never been able to fix that program. Thanks again. I am going to load it on my NEC 8201A and see if it will run there :D Thanks, Chris Maness On Mon, Jun 17, 2013 at 12:40 PM, Greg Larkin glar...@freebsd.org wrote: -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.0 -0700 +++ sun.bas2013-06-17 11:57:55.0 -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(H1. 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- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Any BASIC Gurus around?
Here is a link to the USNO article that the BASIC program originated from: USNO171s.pdf http://www.chrismaness.com/backend/USNO171s.pdf Thanks, Chris Maness ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Any BASIC Gurus around?
Hi, Reference: From: Chris Maness ch...@chrismaness.com Date: Mon, 17 Jun 2013 13:52:47 -0700 Chris Maness wrote: Here is a link to the USNO article that the BASIC program originated from: USNO171s.pdf http://www.chrismaness.com/backend/USNO171s.pdf Thanks, Chris Maness As you need max syntax checking from OCR, throw it at as many different basic interpreters/ compilers as you can, inspect where each bleats, some error messages may be more less usefull for different errors. A friend of mine wrote a basic decades back, its in /usr/ports/lang/pbasic/ Cheers, Julian -- Julian Stacey, BSD Unix Linux C Sys Eng Consultant, Munich http://berklix.com Reply below not above, like a play script. Indent old text with . Send plain text. No quoted-printable, HTML, base64, multipart/alternative. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org