Eugenio, Back in 2017, I built a download for "Eliza", a game translated from BASIC. It was compiled with GnuCOBOL 2.2. You can still download it from here: https://www.arnoldtrembley.com/Eliza-setup-rename-7z-to-exe.7z If you rename the file extension to .exe and run it as a setup file, and install it into a folder named C:\eliza, you can then open a CMD window in that folder, type "eliza" and play with it. The folder contents look like this: Directory of C:\eliza 2026-01-12 07:54 PM <DIR> . 2026-01-12...
I know the OpenCobolIde for Windows uses GnuCOBOL 2.x with PDCurses, and my GC 3.2 build uses PCCursesMod (wincon rather than wingui). You WILL get different results in PDCurses using wingui versus wincon. I believe the SuperBOL GnuCOBOL uses NCurses, so I would not be surprised if there were some differences between GC with PDCurses and GC with NCurses.
To be clear, I never checked the generated C code, because I am not well versed in C. I don't believe I can determine if there is a defect in the generation of the intermediate C code. But I believe that the COBOL results are correct in all cases, using either c_main.cob or the similar bug1165v01.cbl (with extra display statements).
Thank you very much for the additional information. I think you may have a minor error in your sample program. The following statement: DISPLAY 1 " -> " SYAWDR-SIGMA-TXT (1) Should be replaced by one of these examples: DISPLAY 1 " -> " AUSGABE (or) DISPLAY 1 " -> " D312-SORT-TAB (or) DISPLAY 1 " -> " D312-SIGMA-KOPF (1) I do not have a very current version of GnuCOBOL 3.3 DEV. Mine comes from Chuck Haatvedt and has the following version: Microsoft Windows [Version 10.0.26200.7309] 2025-12-08 16:57:01...
Thank you very much for the additional information. I think you may have a minor error in your sample program. The following statement: DISPLAY 1 " -> " SYAWDR-SIGMA-TXT (1) Should be replaced by one of these examples: DISPLAY 1 " -> " AUSGABE (or) DISPLAY 1 " -> " D312-SORT-TAB (or) DISPLAY 1 " -> " D312-SIGMA-KOPF (1) I do not have a very current version of GnuCOBOL 3.3 DEV. Mine comes from Chuck Haatvedt and has the following version: Microsoft Windows [Version 10.0.26200.7309] 2025-12-08 16:57:01...
I don't understand this bug description. Could you please provide the complete data definitions with PICTURE clauses for SYAWDR-SIGMA-TXT, KLAMMER-AUF, and D312-SIGMA-KOPF, along with the initial contents or VALUE of KLAMMER-AUF? Then could you also please provide what results you actually received in D312-SIGMA-KOPF, versus what you expected to find in D312-SIGMA-KOPF? Kind regards,
I found this by accident, and thought it was interesting: James Lowden - The Once and Future COBOL https://www.youtube.com/watch?v=RM7Q7u0pZyQ
Do you still need to disable all optimizations with -O0? I finally found "freestanding" in the file generated by running "cobc -vvh > cobc-help.txt", and the definition only says "Do not assume that standard C libraries and "main" exist.' I don't see why that would affect the generation of COBOL working-storage section. I think that it should be a requirement for a compiler to include a diagnostic string in every program that specifies the exact name, version, build date & time of the compiler. I...