You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Crash on fixed-point PRINT USING of small floats #219
Hello, Rob,
I recently downloaded your PC-Basic 2.0.6 software so that I could incorporate the code for a structural analysis program that I worked with in the 1980s. The original code was in Fortran, published in the textbook “Computer Methods of Structural Analysis” in 1970. I converted the Fortran code to GW-Basic and used it successfully for many years.
I re-rote the code using your PC-Basic 2.0.6 and ran an example problem from the textbook successfully. However, when I tried to run two other structure configurations, I got fatal errors. Those crash logs are attached.
The data statements for the textbook example that runs successfully are these:
1 DATA BOOK EXAMPLE
2 DATA 3,4,1,1,1,1,200,53.13,46.85,40
3 DATA 1,1,1,1,1,1,1,10,0,8.5
4 DATA 2,0,0,0,0,0,0,10,10,8.5
5 DATA 3,1,1,1,1,1,1,0,10,8.5
6 DATA 4,1,1,1,1,1,1,0,0,0
7 DATA 1,1,2,0,.25,1,1,.25,1,90,1,0
8 DATA 2,2,3,0,.25,1,1,.25,1,90,0,0
9 DATA 3,2,4,0,.25,1,1,.25,1,90,1,0
10 DATA L,1,0,2.4,0,10,0,0,0
11 DATA E,0,0,0,0,0,0,0,0
My entire code listing is attached to the end of the crash log. If you replace the data statements with these it will run fine.
Augie Mosimann
Activity
A-Mosimann commentedon Dec 13, 2022
I'm not able to attach the full program because the .BAS file type is not supported.
robhagemans commentedon Dec 14, 2022
Thanks for the report! I can work with the listing from the crash log so no need to attach the program.
(It seems Github limits the file extensions it's willing to attach, putting the file in a zip archive before attaching would probably work)
robhagemans commentedon Dec 14, 2022
Crash can be reproduced with
print using "###.##"; 2e-04;[-]Structural Analysis Program Crash.[/-][+]Crash on fixed-point `PRINT USING` of small floats[/+]add test for issue #219
fix issue #219: crash on fixed-point print-using of small floats