Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on fixed-point PRINT USING of small floats #219

Closed
A-Mosimann opened this issue Dec 13, 2022 · 3 comments
Closed

Crash on fixed-point PRINT USING of small floats #219

A-Mosimann opened this issue Dec 13, 2022 · 3 comments
Assignees

Comments

@A-Mosimann
Copy link

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

Bug report

Problem

Steps

Program

Crash log
crash-20221212-z695mvzk.log

crash-20221212-gtkxu_d7.log

Notes

PC-BASIC version:
Operating system version:

@A-Mosimann
Copy link
Author

I'm not able to attach the full program because the .BAS file type is not supported.

@robhagemans
Copy link
Owner

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
Copy link
Owner

Crash can be reproduced with print using "###.##"; 2e-04;

@robhagemans robhagemans self-assigned this Dec 14, 2022
@robhagemans robhagemans changed the title Structural Analysis Program Crash. Crash on fixed-point PRINT USING of small floats Dec 14, 2022
robhagemans added a commit that referenced this issue Dec 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants