Skip to content

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

Closed

Description

@A-Mosimann

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:

Activity

  1. A-Mosimann commented on Dec 13, 2022

    @A-Mosimann
    Author

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

  2. robhagemans commented on Dec 14, 2022

    @robhagemans
    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)

  3. robhagemans commented on Dec 14, 2022

    @robhagemans
    Owner

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

  4. self-assigned this
    on Dec 14, 2022
  5. changed the title [-]Structural Analysis Program Crash.[/-] [+]Crash on fixed-point `PRINT USING` of small floats[/+] on Dec 14, 2022
  6. added 2 commits that reference this issue on Dec 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions